The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
strange behavior of find with xargs jerardfjay Shell Programming and Scripting 9 08-09-2007 09:06 AM
Very Strange Behavior for redirection cahook Shell Programming and Scripting 5 08-08-2007 12:32 PM
Strange Real Memory usage behavior Skyybugg AIX 5 05-31-2007 11:17 AM
Strange Behavior on COM2 Elwood51 UNIX for Dummies Questions & Answers 0 08-02-2006 04:31 PM
strange sed behavior Kevin Pryke UNIX for Dummies Questions & Answers 5 06-13-2003 05:34 AM

 
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 04-04-2006
alexop alexop is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 26
Strange behavior from 'read' statements. (ksh - but could be same on other shells)

I'm getting rather frustrated with an interactive script I'm writing.

The script is divided up, with section for setting variable at the top, then functions (which make up most of the script) then basically a line at the end which calls the first function- the program moves between the functions to do it's thing.

The problem I'm having is when I'm using 'read' to ask the user to 'press return to continue' or suchlike, at some points in the script this works FINE, however at other points it just continues straight through the 'read' without waiting for input or anything. Using 'read -u' had no effect, I have also replaced all these prompts with the following function;

pressreturn() {
echo
echo "Press <RETURN> to continue."
read BLANK
}

This has had no positive effect, the script still ignores the read statement some of the time!

I'm using ksh version M-11/16/88f on AIX 5.2

Thanks for your time on this, folks. I know I havn't provided too much information, I was just hoping this was a not-uncommon gotcha that a few of you might have come up against at one point or another. If anyone requires further information please shout and I'll supply whatever you need.

Regards,

Alex
 

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 06:48 AM.


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