1/16/2018

Using sed to extract the netlist of a specific subcircuit


sed -n "/^\.SUBCKT ZLSABIAS_M\b/,/^\.ENDS/p" zl64k4at.cir > netlist.ZLSABIAS_M

-n tells sed to suppress the automatic printing of the pattern space.

This above sed script dumps the lines between the patterns 
   ".SUBCKT ZLSABIAS_M" at the begging of lines (using \b to match a word boundary), and 
   ".ENDS" at the beginning of lines 
of the netlist file zl64k4at.cir to file
netlist.ZLSABIAS_M. 

1/09/2018

Change (or set) the title of an xterm in csh alias


# alias stitle 'set title=\!*; echo -n "\033]0;${title}\007"'
alias stitle 'echo -n "\033]0;\!:1\007"'

Additional notes:

   !! is the whole command line
   !* is all the arguments of the command
   !:1 is the first argument of the command
   !:2 is the second argument of the command (, and so forth)
   !$ is the last argument of the command