http://stackoverflow.com/questions/29178135/bash-warning-argument-expectedlinux
http://www.cyberciti.biz/faq/unix-linux-test-existence-of-file-in-bash/sql
http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/shell
http://www.cyberciti.biz/faq/bash-for-loop/bash
. Any arguments appear as "$1"
, "$2"
, "$3"
and so on. The count of arguments is in the shell variable "$#"
.oracle
http://stackoverflow.com/questions/6482377/check-existence-of-input-argument-in-a-bash-shell-scriptapp
$ awk 'BEGIN{print "'$v'"}' $ 123test
variable="line one\nline two" awk -v var="$variable" 'BEGIN {print var}' line one line two
http://stackoverflow.com/questions/19075671/how-to-use-shell-variables-in-awk-scriptoop
http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/spa
To sleep for 5 seconds, use:
sleep 5
To sleep for 2 minutes, use:
sleep 2m
To sleep for 3 hours, use:
sleep 3h
To sleep for 5 days, use:
sleep 5d
unix
https://oracle-base.com/articles/misc/oracle-shell-scriptingcode
#!/bin/ksh $min_snap=421 export $min_snap $max_snap=426 export $max_snap $ORACLE_HOME/bin/sqlplus -S perfstat/perf$ORACLE_SID@$ORACLE_SID @sppurge $min_snap $max_snap $ORACLE_HOME/bin/sqlplus -S perfstat/perf$ORACLE_SID@$ORACLE_SID @sppurge $min_snap $max_snap
http://www.dba-oracle.com/t_passing_sqlplus_variable_in_shell_script.htm