日期:2014-05-16 浏览次数:20748 次
#!/bin/sh
awk 'BEGIN{FS=" +";ORS=" ";flag=0}{
while(++c<=NF)
{
if($c~/9/&&flag==0)
{
gsub(9,0,$c);
print $c
flag=1;
}
else
print $c
}
print "\n"
}' 1.txt
SELECT 'AFT_TRD_OPT_LOG', 'SETTBAK_AFT_TRD_OPT_LOG', '9', 'PRESETT_AFT_TRD_OPT_LOG', '9', '', '', '' FROM BACKUP_TABLE WHERE 1 = 1;
SELECT 'AFT_TRD_OPT_LOG', 'SETTBAK_AFT_TRD_OPT_LOG', '0','PRESETT_AFT_TRD_OPT_LOG', '9', '', '', '' FROM BACKUP_TABLE WHERE 1 = 1;