Hello all,
Please i have this command i used to zip different files in differents directory, but i have an error. Note that when i run the command in one directory it works fine.
/X5/WORK/BGH/INV/REG/pdf/SEND/BGH12523/1/*.fo
/X5/WORK/BGH/INV/REG/pdf/SEND/BGH24523/1/*.fo
/X5/WORK/BGH/INV/REG/pdf/SEND/BGH1023/1/*.fo
In the above path, i want to zip all files with extension .fo
Here is the commands, it works great.
for FN in /X5/WORK/BGH/INV/REG/pdf/SEND/BGH12523/1/*.fo; do gzip $FN;
But when trying to do it for all directories like below, i have an error
>nohup for FN in /X5/WORK/BGH/INV/REG/pdf/SEND/BGH*/1/*.fo; do gzip $FN; done &
bash: syntax error near unexpected token `do'
can somebody help?