Sunday, April 7, 2013

Linux, bash tips

Capture output, linux, bash

# send standard output to file named out and error output to file named err
master.sh >out 2>err
# send all output to one file named allout
master.sh 2>&1>allout
equivalent to
master.sh &>allout

Copy shell script to another location from itself
cp $0 destination

No comments:

Post a Comment