![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search excat string in another string (grep "fails") | bora99 | UNIX for Dummies Questions & Answers | 0 | 06-05-2008 06:41 AM |
| Sed and awk backslash characters | potro | Shell Programming and Scripting | 7 | 05-19-2008 08:34 AM |
| ps -ef |grep <string> | soliberus | SUN Solaris | 9 | 12-07-2007 03:31 AM |
| How ro handle backslash character in grep? | rajbal | Shell Programming and Scripting | 1 | 06-18-2007 08:19 PM |
| grep to handle a 0 result | ocelot | UNIX for Dummies Questions & Answers | 6 | 02-05-2007 11:19 AM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
How to handle backslash in grep string
Hi ,
I am doing invert grep using -v but the string contain "/" which break the grep command and it do not skip the lines with "/" on it. Diffu.txt ======== 1159c1159 < <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466"> --- > <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton2505"> 1168,1169c1168,1169 < document.getElementById( 'featureListItemChannelButton7466').innerHTML = '<img src="/images/buttons/playsm_disabled.gif" alt="Subscriber Only Channel" title="Subscriber Only Channel" class="playSm" border="0" height="20" width="20" \/><br \/><br class="v5" \/>'; < Element.addClassName( 'featureListItemChannelButton7466', 'contentUnAvail' ); DiffSkiplines.txt =========== <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton7466"> document.getElementById( 'featureListItemChannelButton7466').innerHTML = '<img src="/images/buttons/playsm_disabled.gif" alt="Subscriber Only Channel" title="Subscriber Only Channel" class="playSm" border="0" height="20" width="20" \/><br \/><br class="v5" \/>'; Element.addClassName( 'featureListItemChannelButton7466', 'contentUnAvail' ); cat /home/zabbix/public_html/diffu.txt| grep -v -f /home/zabbix/public_html/DiffSkipLines.txt returns 1159c1159 --- > <td align="right" valign="middle" class="paddingRight2px" id="featureListItemChannelButton2505"> 1168,1169c1168,1169 < document.getElementById( 'featureListItemChannelButton7466').innerHTML = '<img src="/images/buttons/playsm_disabled.gif" alt="Subscriber Only Channel" title="Subscriber Only Channel" class="playSm" border="0" height="20" width="20" \/><br \/><br class="v5" \/>'; but it do not removes the line with document.getElement string as it has a backslash character before "/>". Please let me know how to get rid of lines with backslash in it?? Regards, Raj |
| Bookmarks |
| Tags |
| regex, regular expressions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|