Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 1997 05:59:04 -0800 (PST)
From:      Vincent Poy <vince@mail.MCESTATE.COM>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        chat@freebsd.org
Subject:   Re: Autocreate script
Message-ID:  <Pine.BSF.3.95.970227055831.438m-100000@mail.MCESTATE.COM>
In-Reply-To: <199702271236.XAA03536@genesis.atrad.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Feb 1997, Michael Smith wrote:

> Vincent Poy stands accused of saying:
> > 	I'm currently working on the autocreate script...looks good so
> > far. I was wondering if anyone knew of a way to convert strings.
> > 
> > Let's say $string is "SomeLongUserName"
> > I want to convert that to "SomeLong"
> > 
> > so it would be a valid username.
> > 
> > Any ideas?
> 
> $ string=SomeLongUserName
> $ echo "puts [string range $string 0 7]" | tclsh
> SomeLong
> 
> or for the minimalists amongst us :
> 
> $ echo $string | cut -c 1-8 
> SomeLong

	Thanks!

OK...how would I get that result into another variable like $string2 ?


Cheers,
Vince - vince@MCESTATE.COM - vince@GAIANET.NET           ________   __ ____ 
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
GaiaNet Corporation - M & C Estate                     / / / /  | /  | __] ]  
Beverly Hills, California USA 90210                   / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____]






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970227055831.438m-100000>