Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
4
Newest
 Student
Impact
~403 people reached

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Jul
22
comment How to grep all xml files that do not begin with “<”
@roaima: I have no spaces in file names
Jul
22
comment How to grep all xml files that do not begin with “<”
@ User112638726: Yes; That was the right solution: find . -type f -name "*.xml" | xargs -I{} awk 'NR==1&&!/^</{print FILENAME}' {} But I haven't understand all the options :)
Jul
22
comment How to grep all xml files that do not begin with “<”
yes don_crissti; you are right. I want to find the files that begins for example like this: a<?xml version="1.0"?> or like that: b<?xml version="1.0"?> but not the the files beginnug like that : <?xml version="1.0"?>
Jul
22
comment How to grep all xml files that do not begin with “<”
Maybe the test is on the complete line? I want to test only the first char of the first line.
Jul
22
comment How to grep all xml files that do not begin with “<”
Thanks but taht gives the xml files that begins with "<" I want files that do not begin with “<”
Jul
22
comment How to grep all xml files that do not begin with “<”
@roaima; it's done ;)