![]() |
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 |
| How to print only lines in between two strings using awk | jisha | Shell Programming and Scripting | 4 | 01-11-2008 04:13 AM |
| replace 2 identical strings on different lines | prkfriryce | Shell Programming and Scripting | 3 | 06-15-2007 12:18 PM |
| Extracting the lines between 2 strings of a file | babloo | Shell Programming and Scripting | 2 | 02-14-2007 11:27 AM |
| many strings against 5million lines | r0sc0 | Shell Programming and Scripting | 2 | 01-19-2006 09:04 PM |
| How to select strings with space? | nir_s | Shell Programming and Scripting | 4 | 05-09-2005 10:22 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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. |
![]() |
| Bookmarks |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|