unshar (Re: date+ - add specified time to date)

Chris A. Gordon cagordon at watnot.UUCP
Thu Jul 18 10:00:31 AEST 1985


In article <6511 at boring.UUCP> ken at mcvax.UUCP (Ken Yap) writes:
># unshar - pipe shar part of input through sh
># Ignore lines before first "#" comment starting in first column.
># Input is either $1 or stdin.
>sed -n '/^#/,$ p' ${1-} | sh
>
>Good stuff. This is even better.
>sed -n '/^#/,$ p' ${1-} | exec sh

Or, if you are using /bin/csh, and wish to save a small amount of filespace:
alias unshar "sed -n '/^#/,$ p' \!* | sh"  (or  | exec sh  whatever you wish)
placed in the login file will set up an alias which works just as well.



More information about the Comp.sources.unix mailing list