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.
In reply to Re: Re: Taking Input And Running In Script
by hostux
in thread Taking Input And Running In Script
by hostux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |