> On Nov 17, 2017, at 03:36, Marek Stepanek <[email protected]> 
> wrote:
> Hello all!
> I would like to reverse the order of a selected lines with a BBEdit
> filter. Best with Perl.

I'm sure there's a Perl one-liner, but the Python script I use is:

#!/usr/bin/env python3
import sys
with sys.stdin as f:
        lines = f.readlines()
        lines.reverse()
        for l in lines:
                sys.stdout.write(l)
sys.stdout.flush()

-- 
 Mark Damon Hughes
 <[email protected]>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to