The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
adding spaces for a variable value dnat Shell Programming and Scripting 2 02-26-2008 05:32 AM
adding PATH variable wir3d UNIX for Dummies Questions & Answers 3 09-19-2007 05:45 AM
Adding PATH variable in the startup scripts rajanishshetty UNIX for Dummies Questions & Answers 5 03-02-2007 12:51 PM
adding 0 to a variable shivakundan Shell Programming and Scripting 3 02-14-2007 10:05 PM
adding contents of a variable to a command gammarays Shell Programming and Scripting 2 02-08-2005 01:39 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-22-2008
Kochu77 Kochu77 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 6
adding value to variable using expr

for i `cat abc.txt`
do
m= `expr $i + 2`
echo $m
done
i wrote this script to assing value to m. but i got the error

"a.sh[6]: 423: not found"

please help me to sort out this issue
  #2 (permalink)  
Old 11-22-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,294
Remove the space after the equal sign (=) in this statement:

Code:
m= `expr $i + 2`
  #3 (permalink)  
Old 11-22-2008
Kochu77 Kochu77 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 6
worked thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0