New answers tagged stdin
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.
...
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 '&...
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&...
Top 50 recent answers are included
Related Tags
stdin × 325bash × 97
pipe × 81
stdout × 76
shell × 52
io-redirection × 46
shell-script × 39
linux × 27
command-line × 18
terminal × 15
stderr × 14
file-descriptors × 13
ssh × 12
tty × 12
cat × 12
read × 10
files × 9
fifo × 9
process × 8
tar × 8
background-process × 8
text-processing × 7
python × 7
arguments × 7
scripting × 6