[nSLUG] Any Perl Experience around?

Hatem Nassrat hnassrat at gmail.com
Thu Jun 22 12:39:35 ADT 2017

Hatem Nassrat

On Thu, Jun 22, 2017 at 1:05 AM, Mike Spencer <mspencer at tallships.ca> wrote:

> > ls -F --color | perl -lne 's/(.{24}).*/$1... /s ; print' | column -x

I got this:

perl -lne 's/((?:\e\[\d+(?:;\d+)?m)*)([^\e]{23})[^\e]*(.*)/$1$2...$3/s;

it replaces the output of  /bin/ls -Fc --color quite well, it also keeps
the directory marker or execution asterisk marker ... BUT ... seems to mess
up when passed to the column command.

My suggestion would be to redirect each piece to a file and work on each of
them separately.

-- Hatem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20170622/4755f20a/attachment.html>

More information about the nSLUG mailing list