Using For Loop to find a word in list of files/direcories under a directory and move it to another folder
for file in `ls -1`; do grep "^From: Postmaster@hdfcbank.com" $file; if
[ $? -eq 0 ];then mv $file /root/work; fi; done
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment