Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Name: LANkrypt0 Date: July 2, 2002 at 09:33:09 Pacific
Reply:
Id do it a messy, but it would work
grep "word" file | tr "[ ]" "[\n]" | grep "word"
0
Response Number 2
Name: James Boothe Date: July 2, 2002 at 12:36:37 Pacific
Reply:
Actually, that was pretty creative. The following awk solution will print each word in the file that contains a slash. It could easily be adjusted to print only the first qualifying word in each line, or whatever:
awk '{for (w=1;w<=NF;w++) \ if (match($w,"/")) \ print $w}' myfile
0
Response Number 3
Name: LANkrypt0 Date: July 2, 2002 at 12:55:51 Pacific
Reply:
Aye, the example I gave can also be easily modified (forgot to mention that)
cool, but i made a small mistake, i need the whole path to the script:) sorry boys, how can i do this?:) output must be smt like this -> /usr/local/apache_test.sh, a not a single word. Any idea?
Summary: This is my repost. I am a unix newbie trying to learn *nix/C programming. I can't compile the very first code from Late Stevens apue. I use freebsd 5. Plz read the following where I have given all...
Summary: Given a phrase like this: WORD1 WORD2: WORD3 WORD4 WORD5 I just want WORD3 WORD4 WORD5. I can tail the file it comes from to get the last line, but how do I get only those last few words? It needs ...
Summary: Thanks for the reply; however, there is no need for help any more. I actually did it, and I felt like a stupid A** for not realizing what I was doing wrong because it was getting late 2 am, and I had ...