Ok I'm confused. What exactly are you trying do here? ???
you are right it does look cleaner that way, however its not producing the desired results. okay here is what i have done to date.
I have broken it down to three parts.
Now im trying to combine all three of these results together and when i typed in this...Code:this command gets me results for all 3 lettered words in file grep '^[a-zA-Z][a-zA-Z][a-zA-Z]$' This command gets me results of all words with 3 characters including the period symbol. grep '^U[a-zA-Z|.][a-zA-Z|.]$' This command gets me results of all uppercase U's grep '^U'
The file starts outputting results however it appears it is hanging now. and looks like it hangs after the third grep in the command.Code:grep '^[a-zA-Z][a-zA-Z][a-zA-Z]$' | grep '^U[a-zA-Z|.][a-zA-Z|.]$' | grep '^U'
hehe maybe im just confusing the korn shell. LOL That is the shell im using.
Edit for clarification: when i said it appears to be hanging its looks like its outputting only the last grep command and ignoring the first two.
Ok I'm confused. What exactly are you trying do here? ???
[quote author=cloverm link=board=10;threadid=4337;start=0#43236 date=1027713593]
Ok I'm confused. What exactly are you trying do here? ???
[/quote]
don't worry im just as confused, question is....
Find all the words in /home/path/filename that have only 3 characters and start with a "U" (uppercase U)
So what im gonna do cuz all this has to go to a file im just gonna do them indivually and append them to the file instead, and see what is said.
But a new problem cropped up. I can't remove dirs or my files that i messed up. So have emailed them to see why. I have chmoded till im blue in the face and no go...this is agrivating, Im tired of the datamanagement aspects of this, last half will be scripts and MUCH FUNNER!!!![]()
Edit: Im so glad im STUBBORN!!! just got my directories and files fixed.hehehehe
[quote author=NeoStarO1 link=board=10;threadid=4337;start=#43238 date=1027714665]
Find all the words in /home/path/filename that have only 3 characters and start with a "U" (uppercase U)
[/quote]
This will work if you have one word per line.
Code:grep '^U..$' /home/path/filename
So it appears that im reading the question wrong. So it only wants words that have a total of 3 characters and start wtih the letter U (uppercase)
Hmmm maybe that was my problem, I thought it meant ALL words that have 3 characters and also Words that start with uppercase U.
Well I'll go with your advise.![]()
I sure have learned alot about grep for sure.I can see where it can be very usefull.
Bookmarks