![]() |
|
|
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 |
| help need to find the length of a variable | smr_rashmy | Shell Programming and Scripting | 7 | 02-18-2008 06:02 AM |
| Length of a variable | karyn1617 | Shell Programming and Scripting | 3 | 02-08-2005 06:41 PM |
| creating a fixed length output from a variable length input | r1500 | Shell Programming and Scripting | 2 | 12-03-2003 01:09 PM |
| How to define two variable in foreach command?? | geoquest | Shell Programming and Scripting | 14 | 08-22-2002 07:11 PM |
| Using Grep to Define a Variable | cspcspcsp | UNIX for Dummies Questions & Answers | 1 | 10-12-2001 01:22 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
define length of variable
I have a variable with a value of "05". When I add one to that variable, using the command: CURR_YY=`expr $CURR_YY + 1`, I get the value of "6", losing the leading zero (which is needed for passing to another script). How do I keep the leading zero?
Thank you! |
|
||||
|
Although we have korn shell here, the first line in our scripts set the environment to bourne shell (.#!/bin/sh), so the typeset command does not work. I apologize for not putting that in the initial posting. I'm still learning
![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|