multiple variables from file
while read -r a b; do ./iu-copy -S imap.rediffmailpro.com/$b/$a -D 127.0.0.1/$b/$a ; done < emerg >> emerg.log 2>&1
cat 1|cut -d"." -f3-4 -- to cut last three and four octet of IP
awk '{n=split($0,A,".");S=A[n];{for(i=n-1;i>0;i--)S=S"."A[i]}}END{print S}' to reverse print the IP
find /home/raji/inbound/ -type f|egrep -iv Archive|xargs -i mv -f "{}" /home/raju/inbound/Archive/" #To Archive the file to Archive directory from ftp server end
e
cho "techmed-VM38.secure.redaid.com_mysql_hot_backup_2012091205.xbstream.gpg" | sed 's/.gpg//'
mount
mount |column -t
=============
Simple script to list all active and system users.
To remove all gems
'gem list | cut -d" " -f1 | xargs gem uninstall -aIx'
Pass yes/no reply for overwriting
yes n|cp -i ====== no for overwriting
yes y|cp -i ====== for overwriting
Script to copy files for Particular date
ls -ali |grep -i Aug | grep -i 2011 |awk {'print $10'}|xargs -I '{}' mv {} /home/sanoj/123
Replace
replace 'dest word' 'source word' -- file.txt
Find and Copy file.
find . -name | 02022_201201140501042684. | -exec cp {} /123/ \; |
No comments:
Post a Comment