![]() |
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 |
| get rid of special characters | vakharia Mahesh | UNIX and Linux Applications | 4 | 07-29-2008 02:36 PM |
| nawk-how count the number of occurances of a pattern, when don't know the pattern | cyber111 | Shell Programming and Scripting | 2 | 05-11-2008 04:00 AM |
| special characters | nawnaw | UNIX for Dummies Questions & Answers | 2 | 05-18-2004 04:17 PM |
| Changing Special Characters Using Sed | cstovall | Shell Programming and Scripting | 4 | 09-15-2003 07:25 PM |
| awk/sed with special characters | apalex | Shell Programming and Scripting | 5 | 05-06-2002 05:40 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
NAWK - seach pattern for special characters - } dbl qt - sng qt
i'm puzzled....
trying to look for the pattern }"'. but the below code returns to me the message below (pattern is curley queue + dbl qt + sng qt + period) Quote:
Code:
nawk -v pat="\}\"\'\."'
{
if (match($0, pat)) {
before = substr($0,1,RSTART-1);
do {
pattern = substr($0,RSTART,RLENGTH);
printf("%s%s\n", before, pattern);
$0=substr($0, RSTART+RLENGTH)
} while (match($0, pat))
}
}' $HOME/TEMP/X1.dat >> $HOME/TEMP/X2.dat
Quote:
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|