The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-11-2009
acheong87 acheong87 is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 6
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):

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...