![]() |
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 |
| bc, negative values and "total" (whit swapped -) | columb | Shell Programming and Scripting | 3 | 3 Weeks Ago 04:33 PM |
| Whats the problem whit my script??? | cristi2008 | Shell Programming and Scripting | 4 | 11-29-2008 02:34 PM |
| connect whit Telnet without password | raffyTxT | SUN Solaris | 2 | 10-18-2004 11:43 AM |
| compress and descompress file whit pack | jtapia | UNIX for Dummies Questions & Answers | 6 | 12-05-2003 08:39 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
SOS whit SED
Hello,
I know how to get a solution of a filtering problem with AWK, but i need change default field separator by a regular expression. awk -F "xxx" What i want to do is take a stranza as a field, so the field separator must be a EMPTY line. Does anybody how to do that?? a example: blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla blablablablablablablablablablablablablablablabla I want to take as a field each one of those three stranzas. Thank you very much. Told me I look good Last edited by antuan; 2 Weeks Ago at 09:01 AM.. |
|
||||
|
I couldn't understand your second post. Here is your original post, translated into English:
Greetings, I need to use SED to create a tool to make my job easier. The objective is to filter a log to show me only those entries that contain a certain string. The format of each entry is as follows: a) an entry may contain several lines b) they always begin with a date Before now I've been able to use SED to insert a blank line between entries: cat registro.log | sed '/^2009-11-06/{x;p;x;}' (I replace the date with a variable obtained with the date command) With this I've been able to insert a blank line before each log entry so that there is now a way to know when each log entry begins and ends, but now I need to show only those entries that contain a certain string. Can someone help me? Thank you very much. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| sed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|