![]() |
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 |
| select a portion of a file into a CSV | anju | Shell Programming and Scripting | 8 | 02-28-2008 01:50 AM |
| Delete Portion of a file | sameersbn | High Level Programming | 2 | 01-20-2007 12:16 AM |
| extract date portion from file | misenkiser | Shell Programming and Scripting | 5 | 10-06-2006 05:37 AM |
| remove portion of file | methos | Shell Programming and Scripting | 13 | 08-16-2002 09:26 AM |
| How to extract a portion of a string from the whole string | ds_sastry | UNIX for Dummies Questions & Answers | 2 | 09-29-2001 10:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hello,
I want to grep the log file according to time and get the portion of log from one particular time to other. I can grep for individual lines by time but how should I print lines continuously from given start time till end till given end time. Appreciate your ideas, Thanks chandra |
|
||||
|
Hello vino,
when I am using sed -e "/start pattern/,/end pattern/p" file > tmpfile tmpfile is containing duplicate lines from start pattern to end pattern along with the whole 'file'. I am not able to output only those lines ??? I was getting what I wanted when I do diff between two files but now I need it in a file. Need assistance...Thanks |
|
||||
|
thankyou, that helped.
If I have to put these lines from start pattern to end pattern into another file at the same place, I am not able to do so. I tried to use sed -s again to try if it adds to the target file. but its adding at the end and also duplicating the lines. sed -n 's/\"/echo config_start/,/echo \"end_install\"/p"//' config1.log>tmpfile sed -n 's/\"/echo config_start/,/echo \"end_install\"/p"//' tmpfile config2.log when I do this, it's adding each line in tmpfile twice and also at the end of config2.log When looked into sed, i saw sed -f functionality but not able to get the syntax. I need help in this one aswell. Regards chandra |
|
||||
|
I tried several combinations with awk, but the only piece missing is that the lines sitting at the right place in the file.
As sed -n picked the lines from a start pattern, I want to insert them exactly like that. Any suggestions ... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|