Batch - combining 3 columns of x, y, z values into 1 column without using MatLab

放肆的年华 提交于 2019-12-08 02:18:27

Assuming you only have the files of interest in your present working directory, and, that the delimiter of your files is a single space, and, that you have GNU sed installed:

sed -i 's/ /\n/g' *

Alternatively, you could avoid sed and use tr and a for loop, like this:

for i in file*; do tr " " "\n" < "$i" > "$i.bak" && mv "$i.bak" "$i"; done
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!