Re: Shell question.

From: Date: Thu, 11 Sep 2003 03:56:55 +0000
Subject: Re: Shell question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162244@lists.php.net to get a copy of this message
use ; at the end of print $sysnew = echo $system | awk -F. '{ print; $1 }' ; -Murugesan ----- Original Message ----- From: "Sethi, Samir (IDS DM&DS)" <samir_sethi@ml.com> To: <php-general@lists.php.net> Sent: Thursday, September 11, 2003 12:31 AM Subject: [PHP] Shell question. > Anyone had a chance to look at this. Been trying different combinations, doesn't appear > To work. > Thanks. > > -----Original Message----- > From: Sethi, Samir (IDS DM&DS) [mailto:samir_sethi@ml.com] > Sent: Wednesday, September 10, 2003 1:07 PM > To: 'php-general@lists.php.net' > Subject: [PHP] Shell question. > > > > Another shell question - > > $system is set to eq-cca-u1.etsd.ml.com , > Running the commands below should give sysnew as eq-cca-u1 , stripping out the etsd.ml.com. > > $sysnew = echo $system | awk -F. '{ print $1 }' ; > echo "sysnew = $sysnew " ; > > However the echo statement returns sysnew as eq-cca-u1.etsd.ml.com, it should be eq-cca-u1 since > The awk removes everything after the . > > What am I doing wrong here ? Any feedback appreciated. Thanks. > > Samir. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#162244) next »