bash scripting question
- From: Mike McClain <mike.junk@xxxxxxxxxxx>
- Date: Fri, 19 Mar 2010 10:19:28 -0700
I've written a function to print elapsed time similar to /usr/bin/time
but can be called at the beginning and end of a script from within
the script. Occasionally I get an error: '8-08: value too great for base'
It's caused by the difference in these 2 command strings but I can't for
the life of me see what's going on.
now='09:07:16'; startHr=${now%%:*}; startHR=${startHr#*0}; echo $startHr;
09
str=09; str=${str#*0}; echo $str;
9
Thanks,
Mike
--
Satisfied user of Linux since 1997.
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20100319171928.GB31777@xxxxxxxxxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: bash scripting question
- From: Karl Vogel
- Re: bash scripting question
- From: Josep M.
- Re: bash scripting question
- From: Paul E Condon
- Re: bash scripting question
- From: Mike McClain
- Re: bash scripting question
- From: Wayne
- Re: bash scripting question
- From: Chris Jackson
- Re: bash scripting question
- From: S Scharf
- Re: bash scripting question
- From: Sven Joachim
- Re: bash scripting question
- Prev by Date: Re: why does resolv.conf change?
- Next by Date: Re: bash scripting question
- Previous by thread: Mailing list policy change?
- Next by thread: Re: bash scripting question
- Index(es):
Relevant Pages
|