- 论坛徽章:
- 0
|
get_bill_from_tabn dbsale_rec.world aaaaaa bbbbbb t10000001 "|" 1000000 "select phone_id,county_code,pay_fee,cust_id,cust_name,cust_address,exch_name from od_market_qqt"
get_bill_from_tabn dbsale_rec.world aaaaaa bbbbbb t10000002 "|" 1000000 "select * from od_staff"
我有一个标准格式的文本,语句如上,以空格分隔,希望在$5这个域的后面批量添加上当天的系统时间变成如下:
get_bill_from_tabn dbsale_rec.world aaaaaa bbbbbb t10000001_20061122 "|" 1000000 "select phone_id,county_code,pay_fee,cust_id,cust_name,cust_address,exch_name from od_market_qqt"
get_bill_from_tabn dbsale_rec.world aaaaaa bbbbbb t10000002_20061122 "|" 1000000 "select * from od_staff"
试验了很多awk指令,都不得其解,echo "20"`date +%y%m%d`的值可以得到当天的时间,但是通过管道送到指定文本后,又无法在gsub()函数中调用,郁闷啊,都快1点了,还是搞不定,请各位大侠出手相助,并请做指令的简单说明。
我是shell编程菜鸟,刚学不久,多指教。 |
|