脚本内容:
#!/bin/bash
#
#####################################
#@file text1.sh
#@brief
#@author xiajing
#@version 1.0
#@date 2017-10-23
#@log ./${shell_name}_${file_date}.log
#####################################
#shell Env
#file_date=201710
file_date=`date +"%Y%m"`
shell_name=`basename $0|awk -F '.' '{print $1}'`
shell_log=${shell_name}_${file_date}.log
parameter1=$1
step_one=`sqlplus -S repxx/repxxxx@ecs<
set heading off
set feedback off
set pagesize 0
set verify off
set echo off
select to_char(sysdate,'yyyy-mm-dd') today from dual;
exit
!`
echo "------"
echo $step_one
输出结果:
lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ sh text1.sh
------
2017-10-24
阅读(1759) | 评论(0) | 转发(0) |