LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-11-2009, 01:08 AM   #1
sangeethaasia
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Fedora 8 - Shell Programs Not Working


i am using fedora 8

shell programs are not working


give me some help


sample program is

echo" enter the strings"
read a b
if [$a eq $b]
then
echo "stirngs are equal"
else
echo "strings are not equal"
fi

some times command not line 3 some error , expression not working
 
Old 08-11-2009, 03:18 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Please post the output of the program. 'some error' is not really descriptive to solve the problem.

Last edited by XavierP; 11-29-2009 at 05:12 PM.
 
1 members found this post helpful.
Old 11-29-2009, 05:12 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Hijack split out - though as the hijack is nearly 4 months old, it may be an exercise in futility
 
Old 11-30-2009, 12:20 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Code:
if [$a eq $b]
1. eq is not a valid bash operator
2. -eq is numeric comparison; string comparator is '=' or '=='
http://tldp.org/LDP/abs/html/comparison-ops.html
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
need shell scripts programs? mitesh.ever Linux - Newbie 4 11-12-2008 08:36 AM
questions about shell programs sachitha Programming 1 08-21-2005 01:46 PM
help installing programs from the shell sempuritoza Linux - Newbie 6 01-20-2005 11:58 AM
Running programs with shell Plmajholm Linux - Newbie 4 01-08-2005 05:06 AM
Will Programs work in shell? Borg Swarm Linux - Newbie 4 01-31-2004 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:54 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