Results 1 to 2 of 2
This is what I have to do:
Display any lines that contain applet tags (containing '<applet') in the files that end in either .html or .htm under the $HOME/public_html directory. ...
- 10-08-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 1
How do I find tags?
This is what I have to do:
Display any lines that contain applet tags (containing '<applet') in the files that end in either .html or .htm under the $HOME/public_html directory. If there are one or more lines then print: "applets". No other output should be displayed. Hint: use >2> and &&
I entered this command
find /public_html/index.html: 2<applet
but nothing happened.
- 10-08-2011 #2Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
You need to look a them man pages for the commands of "find", "xargs" and "grep":
Assuming it is not a homework assignment here is an example of one of many solutions.
Code:(find ./public_html/ -name '*.html' -print0 ; find ./public_html/ -name '*.htm' -print0) | xargs -0 grep '<applet'


Reply With Quote