![]() |
|
|
|
|
|||||||
| 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 |
| How to find special characters?? | sumitc | AIX | 3 | 05-04-2008 05:20 PM |
| Grep with Special Characters | Vashj | Shell Programming and Scripting | 6 | 11-27-2007 03:51 AM |
| how to see special characters in a file using vi | jingi1234 | UNIX for Dummies Questions & Answers | 6 | 10-19-2005 08:57 AM |
| special characters | nawnaw | UNIX for Dummies Questions & Answers | 2 | 05-18-2004 12:17 PM |
| awk/sed with special characters | apalex | Shell Programming and Scripting | 5 | 05-06-2002 01:40 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
unescaping special characters
how do i unescape special characters in Unix.
Suppose i've a file named -xyz.txt, how do I remove the file. Ofcourse Icant give rm -xyz.txt thats not gonna work. We can go in regular expression like this ls | grep -e '-'xyz.txt | rm; but I'd like to know any simpler way than this. Thanks for the guys posting in their suggestions. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
for the case where you want ro remove a file beginning with a -, e.g -xyz you can do
Code:
rm -- -xyz HTH |
|
#3
|
||||
|
||||
|
And just to make it clear - that is not a space between the dashes... copy/paste it to see the format clearly
|
|
#4
|
|||
|
|||
|
Escaping special characters (at least in SED), is the foward slash key '\''
e.g. http:// = http\:\/\/website.com\/ |
|||
| Google The UNIX and Linux Forums |