DS has asked for the wisdom of the Perl Monks concerning the following question:
Hello guys , I am trying to check my OS type here :
but it don't seem to do the job , do you see the problem , thanksif (( $OSTYPE eq "cygwin" ) or ( $TERM eq "cygwin" )) { $DRIVENAME=`pwd | tr '/' ' ' | gawk '{print $1}'`; # additional check for newer versions of cygwin that # do not support //drivename conventions if ( $DRIVENAME eq "cygdrive" ) { $DRIVENAME=`pwd | tr '/' ' ' | gawk '{print $2}'`; $BASEDIR="/cygdrive/$DRIVENAME"; } else { $BASEDIR="//$DRIVENAME"; } $NICE=`nice -n +10`; } else { $BASEDIR="/vobs/nbss"; $NICE=""; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: finiding the os type
by davorg (Chancellor) on Aug 05, 2002 at 14:00 UTC | |
Re: finiding the os type
by RollyGuy (Chaplain) on Aug 05, 2002 at 14:36 UTC | |
by DS (Acolyte) on Aug 05, 2002 at 14:58 UTC | |
Re: finiding the os type
by TStanley (Canon) on Aug 05, 2002 at 14:27 UTC | |
Re: finiding the os type
by ichimunki (Priest) on Aug 05, 2002 at 17:33 UTC |
Back to
Seekers of Perl Wisdom