Alan_C wrote:
[...]
perl -0777 -pne 's/\n+/\n/g' rsync_sl_log.txt > rsync_sl_log.txt.new
^^ 4th attempt. Bingo!!!! Works!!!!!
Though I'm unsure if I'm attempting to mix shell and Perl there (bash shell
redirection operator: > redirect STDOUT to a file)
Though it works, does anyone have any further refinement ideas?
Thanks.
It sounds like you're trying to remove blank lines. This should also do
that:
perl -ne '/./ && print' rsync_sl_log.txt
It says "if there is at least a single character on the line, print the
line."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>