Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/bin/bash -x
- # Move all files with a keyword to another directory
- # stdout a count of files moved with the keyword
- file_name=`ls *key_word*`
- for i in ${file_name}
- do
- cp ${i} /home/target_dir
- count=`expr ${count} + 1 `
- done
- echo "Files transfered \ ${count} "
Advertisement
Add Comment
Please, Sign In to add comment