日期:2014-05-16 浏览次数:20904 次
#! /bin/sh # # file: skipline.sh # auth: mymtom # date: 2008-02-22 # DATA=`cat <<EOF update KHI4.ASOF_INFss set ASOF = current date-150 days,USERID = 'GKDP',TIMESTP = Current Timestamp DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0204N "KHI4.ASOF_INFSS" is an undefined name. SQLSTATE=42704 EOF ` echo "${DATA}" echo "" echo "${DATA}" | awk 'BEGIN {getline} 0==0 {print $0}' echo "" echo "${DATA}" | \ awk -v n=$1 'BEGIN { for (i = 0; i < n; i++) {getline;} } \ 0==0 { printf("%s\n", $0); }'