Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 967
  • Last Modified:

find: incomplete statement

Hi ,
  Am trying to run the following command :
  find . -exec grep -i 'Header' {} ; -print > $HOME/xmlver.txt
  to get me the header information for all files in a certain directory , but the problem is that it ends with the error sayin find: incomplete statement ..

  is there anything wrong with the command , please advise .

Regards.
0
Dr_Billy
Asked:
Dr_Billy
1 Solution
 
cjjcliffordCommented:
you need to terminate the "grep" command with a \;

i.e. you need to escape out the semi-colon

i.e.

find . -exec grep -i 'Header' {} \; -print > $HOME/xmlver.txt
0
 
amit_gCommented:
Add a \ before ;

find . -exec grep -i 'Header' {} \; -print > $HOME/xmlver.txt
0
 
koppchaCommented:
find . -exec grep -i 'bin' {} \; > $HOME/xmlver.txt
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now