linux shell program-argument,file exits-date,oracle shell

冷暖自知 提交于 2020-04-18 04:39:28

Bash warning - argument expected

http://stackoverflow.com/questions/29178135/bash-warning-argument-expected

Bash Shell: Check File Exists or Not

http://www.cyberciti.biz/faq/unix-linux-test-existence-of-file-in-bash/

HowTo Format Date For Display or Use In a Shell Script

http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

Bash For Loop Examples

http://www.cyberciti.biz/faq/bash-for-loop/

Check existence of input argument in a Bash shell script

. Any arguments appear as "$1", "$2", "$3" and so on. The count of arguments is in the shell variable "$#".

http://stackoverflow.com/questions/6482377/check-existence-of-input-argument-in-a-bash-shell-script

How to use shell variables in awk script

$ 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-script

shell sleep

http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/

  1. s for seconds (the default)
  2. m for minutes.
  3. h for hours.
  4. d for days.

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

Oracle shell 

https://oracle-base.com/articles/misc/oracle-shell-scripting

大胡子爷爷是如何从shell 脚本里面将数据传到sqlplus 里面

#!/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

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!