learingperl01
MIS
Hello, I am trying to write a script to grep through a bunch of file for different words. I am having problems moving the files to another directory once my grep is done processing. How can I tell my script to only move the files once the grep is complete. Example if I am grepping for abc def zzz against a file called test.txt. I first want to ensure that the grep for all three (abc def zzz) is complete before it tries to move the file. How can I force my script to check that the grep command is done running, once it's done running then its ok to move the file?
thanks,
FYI I am just doing a for files in /path/*; do etc...
thanks,
FYI I am just doing a for files in /path/*; do etc...