From: Peng Li Date: Tue, 22 Sep 2015 15:18:11 +0000 (+0800) Subject: zsh - lftp-cp () wrap lftp command X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;ds=sidebyside;h=cbe0c4e6a8bde424ca94782af5459afc9e585a1d;p=dotfiles.git zsh - lftp-cp () wrap lftp command --- diff --git a/zsh/zshrc b/zsh/zshrc index 045e33c..bae0bed 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -231,3 +231,23 @@ alias tw='open -a /Applications/TextWrangler.app/' #fi export LANG='en_US.UTF-8' export LC_ALL="en_US.UTF-8" + +lftp-cp() { + + server='cmbu-ftp.cisco.com' + user='cmbu' + pass='cisco123!@#' + home='/FTPServer/users/peli3' + dir=`date +%m%d` + + localfile=$1; + remotefile=${home}/${dir}/$2; + + echo "copy ${localfile} to ftp://${server}${remotefile}" + lftp -e "mkdir ${home}/${dir}; put ${localfile} -o ${remotefile}; bye" -u $user,$pass $server +} +merge_logs() { + ls -rl jabber.log* | awk '{print $9}' | Xargs cat >> full.log +} + +export MANPATH=$MANPATH:/usr/local/man