LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-24-2003, 04:59 AM   #1
pazvant
Member
 
Registered: Jul 2003
Location: Istanbul
Distribution: slack
Posts: 43

Rep: Reputation: 15
Angry Command output conrolling in bash


In my script i want to control command output with if loop in case loop..Bu ti did not manage
to control İf loop gives error.Can any one help me for command output control thankss...


PS3="Welcome connection"
select choice in network firewall
do
case $choice in
network) echo "eth0 is starting ...."
"ifconfig eth0 81.21.163.35 netmask 255.255.255.248 &&
route add default gw 81.21.163.33" $a;;
if [ $a=0 ]
then
firewall) echo " Firewall is starting..."
/home/jazzy/afire start ;;
esac
else exit1;

done
 
Old 10-24-2003, 08:01 AM   #2
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 36
I don't know much about bash scripting, but don't you need a "fi" to end your if?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
BASH: let output like 00004 and not 4 bglnelissen Programming 9 09-28-2005 10:24 AM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 05:35 PM
BASH: Output everything between two strings systemparadox Programming 2 12-18-2004 11:26 AM
Bash: How to concatenate the output of different commands? J_Szucs Programming 1 11-13-2003 08:43 AM
Bash script: add all numbers from command output wi-Z-art Programming 2 08-06-2003 10:16 AM


All times are GMT -5. The time now is 04:31 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration