Bash: Handling input from file and keyboard
Hi!
I have this little shell script which copies file names taken from inputfile: Code:
while read line; do Thx, moo-cow |
Code:
for file in `cat t3.t` |
good
|
The easy way to accomplish your task is
Code:
#!/bin/bash The hard way, following your example is Code:
exec 8< inputfile For other uses take in mind you can restore standard input from the terminal using exec < /dev/tty but in your case the while loop would have stopped its execution, having lost connection to the input file. |
Thanks for the solutions!
|
All times are GMT -5. The time now is 01:12 PM. |