|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Need Help With SED!
I'd like to use SED to search for a string, print the line where the string was found, plus print the next 5 lines after the string. Can anyone help??? Thanks.
|
|
#2
|
|||
|
|||
|
sed -n '/stringtoprint/{ p; n; p; n; p; n; p; n; p; n; p;}' inputfile >outputfile
|
|
#3
|
|||
|
|||
|
Thanks guggach | works great!
Thanks for your help!
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Need Help With SED! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|