![]() |
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 handle backslash in grep string | rajbal | UNIX for Advanced & Expert Users | 6 | 06-18-2007 08:22 PM |
| Non-ascii character detection (perl or grep) | srinivasan_85 | UNIX for Dummies Questions & Answers | 9 | 02-20-2007 08:38 AM |
| grep to handle a 0 result | ocelot | UNIX for Dummies Questions & Answers | 6 | 02-05-2007 11:19 AM |
| Grep for X character on a word | jjoves | UNIX for Dummies Questions & Answers | 5 | 08-06-2004 05:14 AM |
| GREP a string with NULL Character | weerich | UNIX for Dummies Questions & Answers | 3 | 09-18-2001 01:30 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How ro handle backslash character in grep?
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 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|