sed 空格替换

ll是ls的一个别名,alias ll='ls -l --color=auto'

ll | sed -n '2,$s/[][]*/\t/gp' | cut -f 9

-或者-

ll | sed -n '2,$s/[]\+/\t/gp' | cut -f 9

这样就取出了ls列表的文件或者目录名

猜你喜欢

转载自www.cnblogs.com/printk/p/10070073.html
今日推荐