syntax error unexpected token near "then"
I am working with Knoppix 4
I am working to replace a file on a crashed computer. I can locate the file and a second file of the same name on the hd1 (atisgkaf.sys WinXP) I can not just replace it with the "good" file because of permissions. I am using the Knoppix Hacks (O'Reilly) It states that writing to NTFS files can be done. I was going to test my abilities with a few different command line attempts before trying to replace the file. I entered ... from the book... p231 $ find /mnt/hda1/ -name *.cab -exec sh -c "if cabextract -l \"{}\" 2>/dev/null | grep atisgkaf.sys; then echo \"*{}\"; fi; " \; return is an syntax error unexpected token near "then". If I remove"then" it changes to a different |
Some tips:
So, ultimately you have: Code:
find /mnt/hda1 -name '*.cab' -exec sh -c 'cabextract -l "{}" 2>/dev/null | grep atisgkaf.sys && echo "*{}"' \; |
All times are GMT -5. The time now is 02:18 PM. |