![]() |
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 |
| I'm stuck :( | Legend986 | High Level Programming | 4 | 10-14-2007 03:21 AM |
| stuck....! | moxxx68 | UNIX for Advanced & Expert Users | 0 | 12-10-2004 11:52 PM |
| Metacharacters | regencyabs | UNIX for Dummies Questions & Answers | 1 | 03-06-2002 02:26 AM |
| Using metacharacters in loops | jrdnoland1 | Shell Programming and Scripting | 4 | 02-11-2002 10:43 AM |
| I'm stuck | Fender | UNIX for Dummies Questions & Answers | 3 | 01-07-2001 02:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
stuck on csh metacharacters
Hello,
I have a question, please (I am using tcsh). I thought that if you enclose something in double quotes, then the shell won't interpret it. For example, when I do: % echo "ls *" I get ls * However, if I do: % echo "!l" I get echo "ls -F" ls -F (my last command was ls -F Why is this so? I thought that because I had enclosed !l inside double quotes, the shell would treat ! as text and not as a special character? Please help! Thanks. A |
|
||||
|
Hi,
Thank you for your reply. Well, the metacharacter '!' is used to refer to the history of the commands. So, for example, if you did ls -a, then followed it by rm *, then did echo $PATH, then !l (!-el) would be the same as the last command beginniing with "el" i.e. ls -a, !r would be rm * and !e would be echo $PATH. I just don't know why echo "!l" is interpreting !l as a shell command!!! Surely it shouldn't when I double quote it. Yes, escaping it with a backslash DOES work (i.e. "\!l" does work), but I don't see why we have to backquote ! when it is already is double quote! After all, we can do echo "ls *", and don't have to do echo "ls \*". |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|