LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-24-2003, 03: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, 07:01 AM   #2
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

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


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

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

All times are GMT -5. The time now is 12:41 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
Open Source Consulting | Domain Registration