Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Must have CLI of Perl's sed's n command

by Tux (Canon)
on Jun 30, 2022 at 06:35 UTC ( [id://11145192]=note: print w/replies, xml ) Need Help??


in reply to Must have CLI of Perl's sed's n command

sed - Perl conversion done with s2p

=head1 NAME psed - a stream editor =head1 SYNOPSIS psed [-an] script [file ...] psed [-an] [-e script] [-f script-file] [file ...] s2p [-an] [-e script] [-f script-file] =head1 DESCRIPTION A stream editor reads the input stream consisting of the specified fil +es (or standard input, if none are given), processes is line by line by applying a script consisting of edit commands, and writes resulting li +nes to standard output. The filename 'C<->' may be used to read standard i +nput. The edit script is composed from arguments of B<-e> options and script-files, in the given order. A single script argument may be spec +ified as the first parameter. If this program is invoked with the name F<s2p>, it will act as a sed-to-Perl translator. See L<"SED SCRIPT TRANSLATION">. B<sed> returns an exit code of 0 on success or >0 if an error occurred +.

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Must have CLI of Perl's sed's n command
by abdan (Acolyte) on Jun 30, 2022 at 10:10 UTC
    How is usage ?
    $ ./s2p -e '/^```\w+$/{n; :a N; /\n```$/!ba }' bash: ./s2p: perl: bad interpreter: No such file or directory $ ./s2p bash: ./s2p: perl: bad interpreter: No such file or directory
    keep such error
      What operating system? Whats the first line of s2p? Why are you calling ./s2p instead of s2p, how did you install it?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145192]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-20 06:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found