开发者

problem with awk print

Hi guys I want to prin开发者_如何学Got in awk line and character ' after the line, but awk put the character in the middle of the line. Here is my code :

awk -v d="'" {print $0 d}

i am using bash2 thanks for help


Use dos2unix on your file, and try the command again.

Or do something like this

awk -v d="'" '{gsub(/[[:space:]]/,"");print $0 d }' file


Try:

 awk -v d="'" '{print $0 d }'

Note the single quotes around the command.


Try this:

awk  '{print $0 "\x27"}' file.txt
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜