奥礼网
新记
Linux-shell怎样把行转为列
如题所述
举报该文章
相关建议 推荐于2016-02-17
awk '{ for(i=1;i<=length($0);i++)
col[i]=col[i] substr($0,i,1)
}
END { i=1
while (i in col)
{
print col[i]
i++
}
}' filename
温馨提示:内容为网友见解,仅供参考
当前网址:
https://aolonic.com/aa/w15d4ak15a4dg1gkkw.html
其他看法
第1个回答 2015-09-06
cat filename.txt | sed 's/\( \)\+/\n/g'
相似回答
大家正在搜
相关问题
awk 如何实现行列转换
在shell中如何给成行成列的文本添加行号和列号,行号我已经...
Linux shell awk怎么去除行内,重复列?
linux shell 脚本中怎样将字符串转化为命令
linux shell中 如何将只含有两列信息的行提取出来
linux 编辑shell如何换行
怎么写awk脚本,让文件里的内容进行行列互换
shell脚本中怎么输出第二列为指定内容的所有行的信息