neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
blah blah ;; yada yada ;; etc etc A much longer field ;; yada yada ;; etc etcEach field can be any width. I want to align the columns including the delimiters. A command like column removes the delimiter. I want to keep the delimiter. I thought this would have been done already, but I can't find anything. So I'm turning to Perl. Again I thought someone would have done this before, but my search has turned up empty. Do I have to roll my own?
UPDATE: You can scrub this node. This works:
cat file.txt |sed -e 's/;;/;;@@/g' | column -s '@@' -tIt adds a second, temporary delimiter.
Neil Watson
watson-wilson.ca
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Aligning delimited columns
by hbm (Hermit) on May 31, 2013 at 14:19 UTC | |
|
Re: Aligning delimited columns
by ww (Archbishop) on May 31, 2013 at 17:53 UTC |