in reply to Re: Taking Input And Running In Script
in thread Taking Input And Running In Script
cheers guys for that.
that worked great, but if you don't mind, cna i ask you one more question? This is the script that i am using below:
#!/usr/bin/perl -w use strict; use Getopt::Long; my ($username, $password, $domain); my $result = GetOptions("username=s" => \$username, "password=s" => \$password, "domain=s => \$domain"); system ("adduser $username -g 100 -s /bin/false -d /home/$username -p +$password"); + open (VFILE, ">> /etc/postfix/virtual"); + + print VFILE "$username\@ap3k.com\t$username\n"; close (VFILE); system ("postmap /etc/postfix/virtual");
when the command adduser is run, if it returns adduser: user foo already exists
i want it to break out of running the rest of the script and maybe just return an error
James
Edited: ~Wed Jul 31 23:07:40 2002 (GMT) by footpad: Added <code> and other HTML formatting tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Taking Input And Running In Script
by derby (Abbot) on Jul 31, 2002 at 20:16 UTC | |
|
Re: Re: Re: Taking Input And Running In Script
by aseidas (Beadle) on Jul 31, 2002 at 20:18 UTC |