Friday, February 24, 2017

Remove arbitrary columns from text lines with perl and splice

Probably not the shorted ... remove the 9th and 0th column from an ls with perl and splice
find . -type f -ls | sort -k11 | perl -ne '@x=split;splice @x,9,1;splice @x,0,1; print join("\t", @x), "\n";' | tail 

No comments:

Post a Comment