![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to print only lines in between two strings using awk | jisha | Shell Programming and Scripting | 4 | 01-11-2008 12:13 AM |
| replace 2 identical strings on different lines | prkfriryce | Shell Programming and Scripting | 3 | 06-15-2007 08:18 AM |
| Extracting the lines between 2 strings of a file | babloo | Shell Programming and Scripting | 2 | 02-14-2007 07:27 AM |
| many strings against 5million lines | r0sc0 | Shell Programming and Scripting | 2 | 01-19-2006 05:04 PM |
| How to select strings with space? | nir_s | Shell Programming and Scripting | 4 | 05-09-2005 06:22 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Find lines with space between strings
Hello all,
I am having trouble with setting up a regular expression used with egrep. My script reads an input file a line at a time. I would like the egrep command to search for the following pattern: server name at the beginning of the line, then one or more spaces, and then a pound sign. A line like this would match: SERVERNAME # A line like this would not match: SERVERNAME# The line in my code that I'm using the egrep command is: SERVER_CHECK=`echo $LINE | egrep ^${APPL_SERVER}[[:space:]]*\#` This is not returning the lines that I know match the pattern I'm looking for. Can anyone help me modify my regular expression? Thanks for your help. |
| Forum Sponsor | ||
|
|