awk输出单引号
2018-08-09 本文已影响7人
夜空最亮的9星
echo | awk '{ print "'\''"; }'
[root@node1 ~]# cat file.txt
epay_entity
store_id
pos_machine_nbr
pos_order_nbr
epay_platform_order_nbr
epay_platform_name
[root@node1 ~]# awk '{print "'\''" $1 "'\''" "," }' file.txt
'epay_entity',
'store_id',
'pos_machine_nbr',
'pos_order_nbr',
'epay_platform_order_nbr',
'epay_platform_name',