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

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

 

转载于:https://my.oschina.net/u/2308739/blog/758141

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值