![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to get desired output after redirection | raji | Shell Programming and Scripting | 3 | 08-29-2008 03:13 AM |
| who truncates the output? redirection? tty? Bug? | fredy | UNIX for Advanced & Expert Users | 7 | 12-10-2006 02:21 AM |
| Redirection of output (for logging) | _Spare_Ribs_ | Shell Programming and Scripting | 3 | 12-04-2006 02:17 PM |
| redirection of ladebug output | yakari | UNIX for Advanced & Expert Users | 2 | 10-06-2006 03:23 AM |
| Standard output and redirection | jerardfjay | Shell Programming and Scripting | 2 | 06-27-2005 12:03 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
output redirection in scripts
I am trying to write a script that will remove any line in 2 given text files starting with '-'. the output should be to the second file. this is what I tried: Code:
#!/bin/csh -f cat $1 $2 | grep -v '^-' > $2 the problem is the after executing the script, file2 contains only the lines from file1. for example: before: file1: A B -C file2: D E -F after: file 2: A B can I do it without temp files? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|