mirror of https://github.com/CrimsonTome/tldr.git
perl: minor tweaks to command descriptions (#3554)
parent
7d5444997f
commit
caebe85050
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
`perl -c {{script.pl}}`
|
`perl -c {{script.pl}}`
|
||||||
|
|
||||||
- Parse and execute a perl statement:
|
- Parse and execute a Perl statement:
|
||||||
|
|
||||||
`perl -e {{perl_statement}}`
|
`perl -e {{perl_statement}}`
|
||||||
|
|
||||||
|
@ -31,6 +31,6 @@
|
||||||
|
|
||||||
`perl -p0e 's/{{foo\nbar}}/{{foobar}}/g' {{input_file}} > {{output_file}}`
|
`perl -p0e 's/{{foo\nbar}}/{{foobar}}/g' {{input_file}} > {{output_file}}`
|
||||||
|
|
||||||
- Run a regular expression on `stdin`, printing out first capture group for each line:
|
- Run a regular expression on `stdin`, printing out the first capture group for each line:
|
||||||
|
|
||||||
`cat {{path/to/input_file}} | perl -nle 'if (/.*({{foo}}).*/) {print "$1"; last;}'`
|
`cat {{path/to/input_file}} | perl -nle 'if (/.*({{foo}}).*/) {print "$1"; last;}'`
|
||||||
|
|
Loading…
Reference in New Issue