Not able execute 'expr' in RedHat Linux 2.6.9-22.EL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Not able execute 'expr' in RedHat Linux 2.6.9-22.EL
# 1  
Old 05-21-2008
Bug Not able execute 'expr' in RedHat Linux 2.6.9-22.EL

Hi,

I am very new to Shell Scripting and am using Redhat Linux 2.6.9.-22.EL kernal version. When I am executing one statement like below I am getting the below mentioned error:

$ x=50
$ y=10
$ z=`expr x / y`
expr: non-numeric argument
$

Could anyone help in this how to resolve?

Thanks in advace,
Anil.
# 2  
Old 05-21-2008
Code:
$ z=`expr $x / $y`

# 3  
Old 05-21-2008
** Please delete this post ** (had posted the same reply as above)
# 4  
Old 05-21-2008
Bug

Dear Aju,

Thanks a lot. Its working fine now.. SmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Difference Redhat Linux/RH Enterprise Linux

what is the difference between Redhat Linux and Redhat Enterprise Linux. whereas Redhat linux have Server installation options too. (2 Replies)
Discussion started by: hananabbas
2 Replies

2. UNIX and Linux Applications

Redhat Linux 5

Can anyone help me outwith the post installation script.I'm newbie to scripting! i need to customize the post installation script using kickstart..here are the requirements to be set set permissions /etc/crontab =400 /etc/securetty=400 /etc/sysctl.conf=600 and following services to be set OFF... (1 Reply)
Discussion started by: bvkumar
1 Replies

3. Shell Programming and Scripting

test expr VS [ expr ]

What is the difference between test expr VS . For example : if test 5 -eq 6 echo "Wrong" and if echo "Wrong" bot will give the same output as Wrong. Now, what is the difference between these two? though they are producing the same result why we need two? Any answer will be... (2 Replies)
Discussion started by: ashok.g
2 Replies

4. UNIX for Dummies Questions & Answers

Redhat Linux?

I seen a pool that said Linux was the most popular Unix download. I then seen Redhat Linux is the most popular Linux download. Is there a difference? Is it the better program/s? (6 Replies)
Discussion started by: Mr_Pinky
6 Replies

5. Slackware

Redhat Linux?

Hi, I use linux and it is a great OS, I use Redhat Linux 9 and I was wondering are they going to update 9 or they'll be leaving that to the fedora project? I would like a stable linux distro. Thanks -n (9 Replies)
Discussion started by: Insomniac
9 Replies

6. UNIX for Dummies Questions & Answers

FTP on Redhat Linux 9

Anyone know how to get FTP up and running on a fresh install of RedHat Linux 9? Thanx, Aaron (2 Replies)
Discussion started by: Spetnik
2 Replies

7. UNIX for Dummies Questions & Answers

Linux RedHat. Help please.

I from russia. install rus Linux RedHat. When i load linux it ask me for user name and pass... and up of ask form label: Welcome to localhost... dont remember... what i want write in it? (sorry, bad english..:( ).. (1 Reply)
Discussion started by: Sen
1 Replies

8. UNIX Desktop Questions & Answers

RedHat Linux Cd

I am wondering if anyone has copies (or can burn me a copy) of RedHat Linux. I will pay shipping charges... I don't have a CD burner and i dont want to run it off of my hard drive... please email me at: empireinfo623@yahoo.com or baldwitm@muc.edu (5 Replies)
Discussion started by: thedude623
5 Replies

9. UNIX for Dummies Questions & Answers

RedHat linux questions??

1. is redhat linux 7.3 the latest version ?? 2. where can i find FREE documentation regarding it ?? installation , etc... Thanks (2 Replies)
Discussion started by: BAM
2 Replies

10. UNIX for Dummies Questions & Answers

redhat linux 7.3

hi, just installed redhat linux 7.3 on my server, and put it in gnome gui. Does anyone know what software i need to run a web server??? and what software i need to set up a proxy to secure it? also, if these are free to download, can you give me the links. Thanx (2 Replies)
Discussion started by: matt2kjones
2 Replies
Login or Register to Ask a Question