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
script command udi Shell Programming and Scripting 2 09-19-2008 05:15 PM
Q: Recording shell script screen output using "script" command ? lalfonso.gomez Shell Programming and Scripting 4 01-18-2007 09:31 PM
reg script command.... deep UNIX for Dummies Questions & Answers 7 03-30-2005 12:22 PM
Sed Script/Command Help FuzzyNips UNIX for Dummies Questions & Answers 8 10-27-2004 09:09 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 02-16-2008
hgjdv hgjdv is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 6
Command taken away from ksh script

Hi,

Any help or suggestions would be most appreciated. I am having problems in the latter end of this ksh script where I will be checking two files. If they exist do nothing otherwise I need to reinitialize the database which resides on o/s Aix 5.3. The problem I am facing is when the reinit command is issued from command line the user needs to manually input y and hit enter ex.(reinitex.pjg) Which takes control away from the script. Is there a solution to script a y with a <enter command> and still maintain control of the script after the reinit is finsihed?

if [[ -e $monShMemFile ]] && [[ -e $vistaFile ]]
then
echo "break out of script"
else
hcidbinit -i
# user needs to enter "y" + enter to reinit database
fi
Attached Thumbnails
Click image for larger version

Name:	reinitex.jpg
Views:	7
Size:	6.0 KB
ID:	433  
 

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 08:54 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