I am trying to move the files which are listing after greaping command.
see the details below
When i am running the grep command
$ grep -il 'Bufman' *.*
fatal.log
fatal_info.log
it has listed some files now i want to move this files to any another locate so i am trying to write this following command which is not working at all
vs the correct form with backtick instead of quote:
mv `grep -il Bufman /finacle/RIPU/*` ../MARK/
-----------------------
But the backticks or $() are the same, and the second form does not work there, so something else is going on. What does the following produce:
grep -il Bufman /finacle/RIPU/*
../MARK/ depends on the directory you are in when you enter the command, so that is a likely cause. Use an absolute path like /finacle/MARK/ path.
./1.sh[2]: --start: Cannot find or open the file.
Moving 1.sh
mv: 1.sh and ../MARK//1.sh are identical
Moving fatal.log
mv: fatal.log and ../MARK//fatal.log are identical
./1.sh[7]: Syntax error at line 8 : `newline or ;' is not expected.