awk实现 文本内的换行符 为分隔符,输出变为逗号

awk实现 文本内的换行符 为分隔符,输出变为逗号

[liujianzuo@ow2 scripts]$ awk -F $ '{print $0}' ldap_member.log
ruanshujun
zouwei
chenyongkang
qudeng
liukangqiang
guolina
huangxiaojuan
zhaoxueying
heting
huqiang
wangning
tanqingbin
guosongdian
huangxiaoling

[liujianzuo@ow2 scripts]$ awk 'BEGIN{ORS=","}{print $0}' ldap_member.log
ruanshujun,zouwei,chenyongkang,qudeng,liukangqiang,guolina,huangxiaojuan,zhaoxueying,heting,huqiang,wangning,tanqingbin,guosongdian,huangxiaoling,hansifang,zhangsujing,xuepeng,zhangshumin,liyuanjun,dailiangbin,yuanying,wangqiumei,zhanzhisong,shenxiaoying,liuxiaojuan,wangduo,xuyuanyuan,lihanchen,zhangyulong,baihan,zhenyanli,kangting,wangdan,maoaihui,jiaowei,baisa,yangjingwei,wangbing,shirunfeng,chenliping,yuanchao,huanghaoran,wangna,zhaoyingzong,zhouliwen,hanshiwen,zhangpengcheng,liuyanni,wangjiao,duziran,hebojian,sunhuliang,liuyuanyuan,wuhaibing,songdiandong,sunmeihui,

上一篇:【转】简述什么是Web服务(Web Service)技术?


下一篇:HeadFirst Ruby 第十五章总结 Saving and loading data