|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
AWK escaping input
Hi,
I have an awk program that throws errors when it hits special characters in the input file. In PHP i would do a: addslashes($input) Is there an equivalent in awk? How else can I escape special characters? Thanks Alba |
|
#2
|
|||
|
|||
|
There is no equivalent to the PHP addslashes()
function in awk/gawk/nawk. In Unix the general rule is that a backslash i.e. '\' is used to escape special characters and '\\' protects the backslash character if necessary. -F |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > AWK escaping input |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|