On Tue, Aug 22, 2000 at 12:36:51PM +1000, Doug Stalker wrote:
> 
> I'm sure this is easy but U'm having a big mental blank when I try to do
> it.
> 
> I have a variable in a shell script (#!/bin/sh) which is a number
> representing a month.  It has a 0 in the front if it is less than ten
> (ie: July is 07) but I need to remove that leading zero.  How can I do
> this?

newmonth = `echo $oldmonth | sed -e 's/0\([1-9]\)/\1/'`

> 
>  - Doug
> 
> --
> _____________________________________________________________
>   Network Operations Engineer - Big Pond Advance Satellite
>  Ericsson Australia - Level 5, 184 The Broadway, Sydney 2000
>   Ph: +61-416-085-390   Email: [EMAIL PROTECTED]
> 
> 
> 
> 
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://slug.org.au/lists/listinfo/slug

-- 
John


--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to