将换行 替换为指定字符 shell
时间:2011-01-11 来源:城市守望者
cat gadgets.txt |tr "\n" " "
2.shell
for i in $(cat gadgets.txt);do echo -n "$i ";done
3.awk
cat gadgets.txt|awk '{printf "%s ",$1}'
相关阅读 更多 +
时间:2011-01-11 来源:城市守望者
cat gadgets.txt |tr "\n" " "
2.shell
for i in $(cat gadgets.txt);do echo -n "$i ";done
3.awk
cat gadgets.txt|awk '{printf "%s ",$1}'