![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Escaping the * character in ksh. | arvindcgi | Shell Programming and Scripting | 6 | 05-19-2008 06:50 AM |
| Escaping specific character in awk | brainyoung | Shell Programming and Scripting | 4 | 01-28-2008 09:42 AM |
| Escaping '*' in Bash | rkshukla14 | Shell Programming and Scripting | 7 | 04-04-2007 08:45 PM |
| bash script help: escaping the '*' | mark_nsx | Shell Programming and Scripting | 18 | 10-07-2005 05:20 AM |
| escaping * in korn shell | prekida | Shell Programming and Scripting | 3 | 07-13-2005 02:19 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
problem escaping newline in ksh
Hi,
I did the below. $ print "\\n" $ I am curious, why does \\n give two new lines? I would have thought that the first \ would escape the second \, and so we'd get \n printed. But we didn't. Any ideas? Thanks. |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
That is a great reply. echo in tcsh gives very different results, so that was really confusing me! So to clarify, for Code:
print "\n" For Code:
print "\\n", For Code:
print "\\\n" (Also, you said the shell only considers \ to be special if it is followed by \ , $ , " or `. So to shell \n does not mean a newline?) Thanks. |