LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2005, 07:06 AM   #1
pazvant
Member
 
Registered: Jul 2003
Location: Istanbul
Distribution: slack
Posts: 43

Rep: Reputation: 15
Bash function


Hi guys,

I have a program in bash. When a start this programme it wants me to hit ENTER key to continue.
I call this programme in my other bash script and gives << ENTER , however
it works but the bash programme did not go below line like ==
.....
..............
/home/backup/upgrade_export $DIR << ENTER ==>After this works program exit !!


echo " TEST TEST" > TEST
 
Old 03-08-2005, 07:47 AM   #2
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Example:

Code:
#!/bin/bash
echo "This is a simple bash script to use the read function"
echo "Press Enter to Continue"
# Blank read to just pause the script, while you do something
read
echo "Please Enter Your name"
read NAME
echo "Please enter your age"
read AGE
echo "So Now we have your name: $NAME and age: $AGE"
echo "Calling a different program...say ping"
echo "Enter a IP Address"
read IP
ping -c 1 $IP
echo "The script read your input and directs it to the ping command."
echo "$NAME this has been a simple example of using read in a bash script"
Not sure if this helps you or not, as I don't know what the bash programs you use are doing. But you should be able to call other programs from a script and have it continue on after that program has finished what it was doing.

Last edited by hanzerik; 03-08-2005 at 07:56 AM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Bash function mijohnst Programming 13 10-23-2005 12:40 PM
Bash function parameter Misel Programming 2 05-17-2003 11:51 AM
stat function in BASH... PokerFace Programming 1 11-04-2002 11:31 AM
compile within bash function? adam_boz Programming 1 09-17-2002 11:13 PM
GOTO function in bash? sobchak Programming 1 07-22-2002 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration