Date: Thu, 4 Jul 2002 20:29:03 +0300 From: Odhiambo Washington <wash@wananchi.com> To: freebsd-questions@FreeBSD.ORG Subject: Shell Script gurus?? Message-ID: <20020704172903.GF56027@ns2.wananchi.com>
next in thread | raw e-mail | index | archive | help
I am writing a small shell cript to help me in managing virtual domains. After I register a new domain, I have to enter the following details about it in a MySQL database: domain name domain passwd max popboxes default forwarder (those who have used vmail-sql know about this) Now in my script I am reading the domain name from stdin (?? echo Entering domain name in MySQL DB: echo "" domain_name= echo -n Please supply the domain name to activate: read domain_name The domain name can be domain.com or the domain.co.ke but I am interested in the part before the first (.) so that I can manipulate some parameter with it. How do I get that alone in a shell after I've read the domain name into a variable?? Trying to invent the wheel here, I am sure, with the things I wanna do ;) Thanks -Wash -- Odhiambo Washington <wash@wananchi.com> "The box said 'Requires Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,' Tel: 254 2 313985-9 Fax: 254 2 313922 so I installed FreeBSD." GSM: 254 72 743 223 GSM: 254 733 744 121 This sig is McQ! :-) Iron Law of Distribution: Them that has, gets. 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?20020704172903.GF56027>