![]() |
|
|
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 |
| quoting question | aegis | Shell Programming and Scripting | 2 | 01-08-2009 07:35 AM |
| *.pm globs without quoting, *.pl doesn't. | tphyahoo | Shell Programming and Scripting | 2 | 06-02-2006 12:37 PM |
| Quoting of special characters | vibhor_agarwali | UNIX for Dummies Questions & Answers | 1 | 01-30-2005 04:58 AM |
| quoting echo 'it's friday' | yls177 | UNIX for Dummies Questions & Answers | 3 | 09-20-2002 12:09 AM |
| Wildcards and quoting | Bab00shka | UNIX for Dummies Questions & Answers | 2 | 09-16-2002 11:16 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
csh quoting enigma
(no, i can't switch shells, although i'd love to. yes, i have read http://www.grymoire.com/Unix/CshTop10.txt.)
i finally managed to get an alias working the way i want it to, but i don't understand how one part of it works (highlighted in red): alias log ' \\ set x=`echo \!:1 | /bin/sed -e "s/\([^_]\)/\1*\{_,\}/g" -e "s|\(.*\)|$L/\1*|"`; \\ 80; ls -1hAFL $x; 80; set x=`echo $x | /bin/awk '\''{ print $1 }'\''`; \!:2* $x;' Code:
alias log ' \\
set x=`echo \!:1 | /bin/sed -e "s/\([^_]\)/\1*\{_,\}/g" -e "s|\(.*\)|$L/\1*|"`; \\
80; ls -1hAFL $x; 80; set x=`echo $x | /bin/awk '\''{ print $1 }'\''`; \!:2* $x;'
Code:
alias log ' \\
set x=`echo \!:1 | /bin/sed -e "s/\([^_]\)/\1*\{_,\}/g" -e "s|\(.*\)|$L/\1*|"`; \\
80; ls -1hAFL $x; 80; set x=`echo $x | /bin/awk '\''{ print $1 }'\''`; \!:2* $x;'
i've done plenty of googling, but i don't get it. what does the escaped single-quote even mean? is the outer-most single-quote (the entire alias expression) closed by the first red single-quote, or is the first red single-quote the start of another set of weirder quotes, or...
|
![]() |
| Bookmarks |
| Tags |
| csh c shell alias quoting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|