Skip to main content

New answers tagged

0 votes

Remove data from the STDIN stream buffer of another TTY session

There's an easier solution that the two proposed ones here, not involving signals. When you've typed that data and pressed Enter, it's there in the tty line's buffers, waiting for anyone to read it. ...
egmont's user avatar
  • 6,518
1 vote

Perl RegEx one-liner that outputs all matches from one line of STDIN

python would be much too verbose as a CLI one-liner For what it is worth, seeing the complex:er perl in @Stéphane's answer... # copy & paste the following lines into a shell to try it out echo '&...
Hannu's user avatar
  • 524
5 votes
Accepted

Perl RegEx one-liner that outputs all matches from one line of STDIN

echo '"this text", " ", "is in speech marks"' | perl -lne 'print for /"(.*?)"/g' Or: echo '"this text", " ", "is in speech marks&...
Stéphane Chazelas's user avatar

Top 50 recent answers are included