如何在shell脚本中如何提取某行并保存到新文件的末尾?
state1state2
如何分别提取这三行并保存到a.txt中,但不另起一行。比如a.txt变成state1 state2 state3我只能提取为3行,求大神帮助
while read LINE;do echo -n $LINE >>output.txt;done < input.txt
cat shell.sh |xargs 1>>a.txt
加个awk的printf就好了提取内容 | awk '{printf $0}'