The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need help with using input file in the while loop sytycd712 Shell Programming and Scripting 2 08-15-2007 11:11 PM
read input file for batch job kinmak Shell Programming and Scripting 14 07-11-2007 07:22 AM
ls while read loop - internal read picking up wrong input dkieran Shell Programming and Scripting 2 05-14-2007 03:02 PM
input inside while read loop jhansrod Shell Programming and Scripting 3 08-13-2005 10:46 AM
TCSH.need help.take input during a while/end loop seg Shell Programming and Scripting 1 08-28-2003 03:41 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 01-09-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
read user input from within a wile loop that is being fed from below

hi!
i need to do a ksh script that uses a wile loop that is fed form below

while read line
do
some things
done < myfile

inside the while loop i need to read user input to ask the user what he wants to do, but "read" reads the file, and not the standard input

while read line
do
some thingys
read answer?'what you want to do?'
if and more thingys upon the answer
done < myfile

is that possible ? if so, how to tell the inner read to use stdin ?

if its not possible (i cant be the only one), how is this commonly fixed ? the file i read can get huge for using arrays, so i dont know
thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0