Date: Tue, 19 Feb 2002 22:01:04 -0800 (PST) From: Eric Boucher <eric_boucher60@yahoo.com> To: FreeBSD <freebsd-questions@FreeBSD.ORG> Subject: Bourne shell programming problem Message-ID: <20020220060104.49523.qmail@web9407.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi everyone, I'm doing a little bourne shell program that makes something installed automatically on my FreeBSD. But I have a little problem: I want to be able to read every caracter of a variable. For example: Suppose I have a variale named TOTO and the content of TOTO is "/toto/tata/foo". So if I do an echo the ouput is: echo $TOTO /toto/tata/foo What I'm trying to do is to catch only "/foo" and put it in another variable. So I tought that if someone tell me how to read each caracter, I can loop over each caracter, remember the positition of the last "/" and then take all the caracters after that "/" and put it in a variable. Can somebody help me on this one? I hope I'm sufficiently clear. Thanks Eric __________________________________________________ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020220060104.49523.qmail>