Skip to main content

Questions tagged [stdin]

stdin is the name of the default input file descriptor of a process. Since there is really nothing special about `stdin`, you *should not* use this tag. Use the [io-redirection] tag for questions on how to redirect input, use [file-descriptors] for questions on how to manage file descriptors, use [lock] for questions of file locking, and use [files] for general questions on file operations.

3 votes
1 answer
320 views

In order to test extraction of large files by a batch job, I wanted to create several relatively small archives. As I was creating increasingly large archives, at some point they became partial of the ...
Satoro Inikei's user avatar
-1 votes
3 answers
271 views

Here is a silly example that effectively illustrates what I need: echo '"this text", " ", "is in speech marks"' | perl -lne 'print "$1" if /"(.*?)"/' ...
Signor Pizza's user avatar
5 votes
1 answer
355 views

This may seem like a question asked, but I have yet to find anything that works and I start suspecting it may be a bug in apt-get… So, I have a python installer wrapping around apt-get, whose relevant ...
Hi-Angel's user avatar
  • 5,620
1 vote
0 answers
209 views

I'd like to use socat to redirect the STDIN/STDOUT of the process executing docker attach <container-id> to a listening TCP socket on my Linux system. root@eve-ng:/opt/unetlab# tty /dev/pts/2 ...
CarloC's user avatar
  • 385
1 vote
1 answer
87 views

I'm using GNU parallel like this (:::: is a form of --arg-file): parallel -0Xuj1 my-command -- :::: <(find … -print0) But it seems like the command's standard input is managed by GNU parallel, ...
Tobu's user avatar
  • 6,809
0 votes
2 answers
135 views

I'm having trouble finding a name for the - character in the context of a piped bash command. What is the - character called? Can I replace it with something more readable for a script? Example ...
tarabyte's user avatar
  • 4,586
1 vote
0 answers
273 views

$ mkfifo mypipe $ echo "hello redirection" > mypipe $ cat < mypipe hello redirection I have problems when I try to do the above with python # pyecho.py with open("/dev/stdin"...
Tom Huntington's user avatar
0 votes
1 answer
131 views

I have large files which are generated on the fly to stdout, one every 24hours. I would like to archive these files progressively on tapes, ideally in a single archive which potentially spans multiple ...
lorenzo's user avatar
0 votes
1 answer
131 views

I have a script which asks users for input in the terminal, therefore in case the script is called with stdout redirected to a file, the user has no context on the prompt. So I would like to duplicate ...
Whimusical's user avatar
0 votes
1 answer
191 views

I seem to remember some command or envvar that tells you this. I'd like basically something that executed on terminal, for instance, give you echo $STDIN /dev/tty echo $STDOUT /dev/tty fdescribe 0 or ...
Whimusical's user avatar
0 votes
1 answer
157 views

stdin: Generally standard input, referred to as stdin, comes from the keyboard. When you type stuff, you're typing it on stdin (a standard input terminal). A standard input device, which is usually ...
Guilherme Woolley's user avatar
0 votes
0 answers
545 views

Is there a way in bash to read a single line from stdin and write directly to a file? Something like: t="$(mktemp)" while true do [read single line from stdin] > "${t}" [...
fuumind's user avatar
  • 449
0 votes
1 answer
88 views

I have these three text files : #1.txt hey stackoverflow #2.txt hey stackexchange #3.txt hello world I am using this command to list the last 3 files in my dir and then cat them and then save ...
Anonymous101's user avatar
1 vote
1 answer
149 views

I am a student and I am trying an excercise that involves assigning a word with quotes, double quotes and other symbols to a file name. The problem is that I am not getting the expected results. I am ...
Daniel's user avatar
  • 21
0 votes
2 answers
2k views

I know this question has been asked several times but it seems ineffective in my case. [[ ! -t 0 ]] = Does standard input contains anything? This command: echo 'Hello world' | [[ ! -t 0 ]] echo $? ...
Mario Palumbo's user avatar

15 30 50 per page
1
2 3 4 5
22