Solved

find: incomplete statement

Posted on 2006-11-22
3
951 Views
Last Modified: 2013-12-26
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
Comment
Question by:Dr_Billy
3 Comments
 
LVL 11

Accepted Solution

by:
cjjclifford earned 125 total points
ID: 17997486
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
 
LVL 58

Expert Comment

by:amit_g
ID: 17997506
Add a \ before ;

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

Expert Comment

by:koppcha
ID: 17998480
find . -exec grep -i 'bin' {} \; > $HOME/xmlver.txt
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 87
sum13 challenge 24 78
Window placement 17 65
Problem to event 3 52
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now