![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading input from user | vadharah | Shell Programming and Scripting | 2 | 03-09-2008 06:35 AM |
| AWK set FILENAME via user input | timj123 | Shell Programming and Scripting | 2 | 02-24-2008 11:05 AM |
| awk user input | gefa | Shell Programming and Scripting | 17 | 10-30-2007 01:01 AM |
| pop out screen with user input | venerayan | Shell Programming and Scripting | 5 | 10-04-2007 07:00 AM |
| user input date | gundu | Shell Programming and Scripting | 10 | 03-21-2005 11:50 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I am trying to create a shell (ksh) which has two "read" commands, one which reads a line from a file and another which is inside a loop that reads user input from a keyboard. However, the "read" command inside the loop uses the input from the file and it does not get the user input from keyboard.
Code:
$ more readtest.ksh
#!/bin/ksh
echo "AAA\nBBB\nCCC" > file
while read line
do
echo "Enter word:"
read word
echo "$line $word"
done < file
Any help will be appreciated. Steve |
| Forum Sponsor | ||
|
|