bash-based Unix Shell Script: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "<U>See:</U>" to "See:") |
|||
Line 2: | Line 2: | ||
* <B>Context:</B> | * <B>Context:</B> | ||
** It cam make use of a [[Unix Utility]]. | ** It cam make use of a [[Unix Utility]]. | ||
* <B | * <B>See:</B> [[perl-based Script]]. | ||
---- | ---- | ||
---- | ---- |
Revision as of 02:23, 22 September 2014
A bash-based Unix Shell Script is a Unix Shell Script based on the bash Shell Program.
- Context:
- It cam make use of a Unix Utility.
- See: perl-based Script.
References
Examples
- Redirecting stderr to stdout (and stdout to stderr)
$ (time sleep 1) 2>&1 | grep real $ (time sleep 1) 3>&1 1>&2 2>&3 | grep real
- Looping
$ loop="true" ; $ while [ "$loop" == "true" ]; do sleep 2; \ up=`uptime | awk '{print $8}'|sed "s/,//"| sed "s/\.//" | bc`; \ echo "$up "; if [ $up -le 7 ]; then loop="false"; fi; done