Questions tagged [stdin]
The stdin tag has no usage guidance.
7
questions
20
votes
7
answers
29k
views
Clear stdin before reading
I have the following bash script:
# do some time consuming task here
read -p "Give me some input: " input
Now as you might have guessed, if a user presses some random keys during the "time consuming ...
11
votes
1
answer
2k
views
Read from stdin to new, named, file in vim
I'd like to start vim on a non existing file, named f, with the content c. Both f and c are arbitrary and I'd like to not have to put anything in the vim config to fill new buffers with c.
Basically, ...
4
votes
3
answers
4k
views
Supply SU password in a bash script, within the script?
The purpose is to restart the machine if it doesn't get an abort command from the user. The problem is that the way the terminals are set up, user must supply SU password for shutdown, init, reboot, ...
2
votes
1
answer
770
views
Using the same file as stdin and stdout results in empty file
If want to filter a file but if I use the same file as input and output the output file is empty. Is there another solution instead of using a second file?
php -r "echo preg_replace('~/\* DEV \*/(.*)/...
-1
votes
3
answers
200
views
How to use the command "read" on a Shell script which reads its arguments from stdin
First of all, thank you for your help in advance and sorry in case this was answered before. I have not been able to find it.
For helping to understand my question, I have written the following ...
19
votes
4
answers
19k
views
Who deals with the star * in echo *
Who deals (interprets) the * in
echo *
Does the echo see the star or the shell take care about it and return a list of filename ..
What about
cp temp temp*
15
votes
5
answers
15k
views
compare two directory trees
I have two music libraries, one a newer version than the other. I would like to compare them to figure which files I need to copy from new music tree to old.
I have tried diff --brief -r /...