Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 02-18-2009, 01:18 AM   #1 (permalink)
Rawmaterial's Avatar
 
True Techie

Join Date: May 2005

Posts: 247

Rawmaterial is on a distinguished road

Default UNIX: Grep Command

Hello All,


I am trying to write a script to search in my current directory to look for all files that end with HTML and look for any HTML tags that are in upper case. for example if I were to grep test.html and test.html has a tag <P> instead of <p> then it would print the file name. This is what I have:


#!/bin/sh

for x in *.html

do
echo $x | grep \<[A-Z]+\>
if [ $? -ge "1" ]
then
echo $x
fi
done





thanks in advance.
__________________
Rawmaterial is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for Files in Linux via Command Line Osiris Linux Tips and Tricks 0 02-13-2009 12:51 PM
Getting to Know Linux: Installing From Command Line Osiris Linux Tips and Tricks 0 01-16-2009 01:24 PM
batch to copy file help under_score Programming Discussions 6 11-14-2008 08:38 AM
BSOD problems yet again. IBM/PS1 Windows Operating Systems and Software 36 08-25-2008 07:54 PM