Re: GETTING the output from a called program, useradd

2001-01-12 Thread Carl Jolley
On Fri, 12 Jan 2001, Ron Pero wrote: > Dear All > > Have followed the thread on Redirect the output of a system function. > > I thought I had this down, but have just gotten stumped. I cannot get the > output of a call to useradd. > > This is on a Linux/bash box. > Have tried the following, bu

Re: GETTING the output from a called program, useradd

2001-01-12 Thread Ron Pero
At 01:40 PM 01/12/01 -0800, you wrote: >Ron Pero wrote: >> >> my $x = `useradd -c $company -m $username`; >> print "\$x = $x"; >> >> When I run the script, the shell outputs the message: >> useradd: user rmartino exists >> but I want to test $x. If the user already exists, I want to stop program