![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| searching and storing unknown number of lines based on the string with a condition | swamymns | Shell Programming and Scripting | 7 | 05-13-2008 01:02 AM |
| replacing new lines in all files of a directory containing old lines | rooster005 | Shell Programming and Scripting | 1 | 03-25-2008 03:38 PM |
| How to count lines - ignoring blank lines and commented lines | kthatch | UNIX for Dummies Questions & Answers | 6 | 05-25-2007 01:21 AM |
| Strip 3 header lines and 4 trailer lines | ganesh123 | Shell Programming and Scripting | 9 | 03-10-2007 05:15 PM |
| need help appending lines/combining lines within a file... | mr_manny | Shell Programming and Scripting | 2 | 01-06-2006 06:45 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed searching across lines
hi,
i'm making now a bash script, that runs some compiler... i want to take only errors form its output eg: output: Code:
bla bla bla ... erros is 1324546 the bla bla bla bla bla bla... ... Code:
erros is 1324546 the bla bla bla Code:
cat errors_file | sed -n "N;s/errors.*\n/&/P" |
|
||||
|
this is not exactly what i want... becouse i don't know how many lines error will have... all i know it beigns with:"errors is" and ends with ^$
#edited and can you explain what your command does? as i understand it it will print out the maching line and the one follwing it... but why this strange syntax? why do you do some {} at the end? where is s/? Last edited by miechu; 09-25-2006 at 05:13 AM.. |
|
|||||
|
From sed man page :
Quote:
First line contains 'erros is' and last line is empty. Jean-Pierre. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|