in reply to awk/perl?
This snippet will substitute the (for example) "lrwxr-xr-x" part into a \n character. I took [dlrwxsS-] to match the possible characters. I might have forgotten one or two possibilities ;)open (INPUT, "<$flatfile"); while(<INPUT>) { $_ =~ /[dlrwxsS-]{10}\s/\n/g; print; } close INPUT;
|
|---|