"Joseph L. Casale" <[EMAIL PROTECTED]> wrote:
>>
What's the simplest way to increment the number up by one until some
other 4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
<<
Easy:
$ seq -f %04g
Best,
--- Les Bell, RHCE, CISSP
[http://w
> What's the simplest way to increment the number up by one until some
> other 4 digit number while
> preserving leading zero's until the 1000's has a digit other than 0?
Lots of answers, depending on the shell. I like this version for ksh:
typeset -Z4 a=-1
while (( a++ < 1000 ))
do
>Your homework done in a snap!
Lol, nah, not homework :P
I don't know what I was thinking, long day. OTH, I never seq could do this as
well!
Thanks!
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
On Wed, Jul 9, 2008 at 6:22 PM, Joseph L. Casale
<[EMAIL PROTECTED]> wrote:
> What's the simplest way to increment the number up by one until some
> other 4 digit number while
> preserving leading zero's until the 1000's has a digit other than 0?
>
Your homework done in a snap!
for (i=0; i<
On Wed, 9 Jul 2008, Joseph L. Casale wrote:
What's the simplest way to increment the number up by one until some other
4 digit number while
preserving leading zero's until the 1000's has a digit other than 0?
In zsh, it would be something like:
for i in {..}; do
echo $i
On Thu, Mar 13, 2008 at 12:04 PM, Jerry Geis <[EMAIL PROTECTED]> wrote:
> hi all,
>
> If I have a shell script on 5.1 that has 2 commands in the script...
>
> command1
> command2
>
> and command1 runs until it is kill'ed by some other process. Sometimes
> command2 runs and sometimes it
> doesnt (th
On Thu, Mar 13, 2008 at 10:29:58PM +0700, Fajar Priyanto alleged:
> On Thursday 13 March 2008 22:04:23 Jerry Geis wrote:
> > If I have a shell script on 5.1 that has 2 commands in the script...
> >
> > command1
> > command2
> >
> > and command1 runs until it is kill'ed by some other process. Someti
On Thu, Mar 13, 2008 at 11:04:23AM -0400, Jerry Geis alleged:
> hi all,
>
> If I have a shell script on 5.1 that has 2 commands in the script...
>
> command1
> command2
>
> and command1 runs until it is kill'ed by some other process. Sometimes
> command2 runs and sometimes it
> doesnt (this is
On Thursday 13 March 2008 22:04:23 Jerry Geis wrote:
> If I have a shell script on 5.1 that has 2 commands in the script...
>
> command1
> command2
>
> and command1 runs until it is kill'ed by some other process. Sometimes
> command2 runs and sometimes it
> doesnt (this is what it seems like).
>
>
9 matches
Mail list logo