Sponsored Content
Full Discussion: Help Please...........
Top Forums Shell Programming and Scripting Help Please........... Post 302127128 by Shell_Life on Monday 16th of July 2007 09:30:39 AM
Old 07-16-2007
Pbsrinivas,
Quote:
b=$b+1 wont it be a string concat..?
No. The OP says he wants to add one to the 'b' variable.
Thus the assumption is that 'b' is defined as integer:
Code:
typeset -i b

Quote:
how to retain the zeros
See the following code:
Code:
typeset -i b
typeset -Z7 bOut
b=123
bOut=$b
echo "b = "$b" bOut = "$bOut

Thanks for asking, Pbsrinivas. Smilie
 
suspend(1)                                                         User Commands                                                        suspend(1)

NAME
suspend - shell built-in function to halt the current shell SYNOPSIS
sh suspend csh suspend ksh suspend DESCRIPTION
sh Stops the execution of the current shell (but not if it is the login shell). csh Stop the shell in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su. ksh Stops the execution of the current shell (but not if it is the login shell). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), kill(1), ksh(1), sh(1), su(1M), attributes(5) SunOS 5.10 15 Apr 1994 suspend(1)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy