![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Opinion: Linux Still Doesn't Make It on the Desktop - Computerworld | iBot | UNIX and Linux RSS News | 0 | 10-01-2007 09:40 AM |
| Opinion: SCO affair - Time to take stock (and a few shots) - iT News | iBot | UNIX and Linux RSS News | 0 | 08-18-2007 07:41 PM |
| Opinion | HN19 | Post Here to Contact Site Administrators and Moderators | 7 | 12-19-2003 04:00 PM |
| Your Opinion requested | pc9456 | SUN Solaris | 4 | 11-17-2003 05:56 AM |
| Need your help and opinion | dennie1 | UNIX Desktop for Dummies Questions & Answers | 4 | 07-10-2002 12:19 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
second opinion on sed script
i'm trying to figure out a script that uses sed, and i'm not totally sure if it does what I think it does.
The script... - takes in 3 inputs, $1, $2 are names. $3 is a file. - filename is a file. Here is what I'm trying to figure out: cat $3 | grep "id17" > var2 sed "s|@@.*||g" var2 > var3 sed "s/^/filename $1 $2 /g" var3 > $3x chmod a+x $3x $3x so does this mean that... 1. it will cat $3 and then pipe it into grep. Grep will find all the lines that contain id17, and then output it to file var2. 2. sed will substitute all words in var2 that contain @@ in the word. It will do this for the entire line. Then it will output the results to var3. 3. sed will substitute all words in var3 ,that begin with $1 and $2, with the filename. It will do this for the entire line. Then it will output the results to a file that has the same name as file $3, but with an x in it. 4. the file $3x will be chmod to be executable. 5. run file $3x. thanks, gammaman |
| Forum Sponsor | ||
|
|