![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to use expr | saikumarm80 | Red Hat | 3 | 01-05-2009 03:52 PM |
| expr problem | kotasateesh | Shell Programming and Scripting | 2 | 08-31-2007 08:00 AM |
| expr | Nathe | UNIX for Dummies Questions & Answers | 5 | 01-22-2004 07:49 PM |
| Problems with expr command | rooh | UNIX for Dummies Questions & Answers | 2 | 01-17-2003 11:03 AM |
| how do I get the value of expr with ksh | krishna | UNIX for Advanced & Expert Users | 3 | 08-26-2001 01:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problems with expr
I'm writing a unix script that simply does some basic command line stuff for a whole lot of similar directories (ls *.dat > foo.bar). Its my first script ever, and its going ok, except I can't, for the life of me, figure out how to get arithmetic to work in the script.
FIVE=5 MY_NUMBER='expr $FIVE + 3' echo $MY_NUMBER even this simple script either outputs "expr $FIVE + 3" at the command line, or fails utterly. Any Ideas? I'm writing it for the bourne shell, on a SOLARIS machine. ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|