![]() |
|
|
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 |
| modify a particular pattern starting from second line of the search pattern | imas | UNIX for Dummies Questions & Answers | 1 | 10-12-2008 02:19 PM |
| modify a particular pattern starting from second line of the search pattern | imas | UNIX for Dummies Questions & Answers | 2 | 10-12-2008 12:30 PM |
| print pattern line +2 without tabs or brackets | repudi8or | Shell Programming and Scripting | 2 | 04-16-2008 09:39 PM |
| awk how to print if the search pattern contains speace | McLan | Shell Programming and Scripting | 1 | 04-09-2008 10:39 AM |
| match a pattern, print it and the next line | nymus7 | Shell Programming and Scripting | 4 | 07-29-2005 01:59 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Print the line within the search pattern
Hi Guys,
I had file as Code:
typedef struct {
char TrailerType1;
char TrailerTxt1[TRADEREFSIZE];
}Trailer;
typedef struct {
char PfigMoneyType[TRAILERNUMSIZE];
char PfigMoneyvalue[DECIMALPRICESIZE];
}PfigMoney;
then O/p should be as Code:
typedef struct {
char PfigMoneyType[TRAILERNUMSIZE];
char PfigMoneyvalue[DECIMALPRICESIZE];
}PfigMoney;
Code:
sed -n '/typedef struct/;/PfigMoney;/p' Filename Thx, Mano |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|