On Tue, Feb 9, 2016 at 8:51 AM, David Magee <[email protected]>
wrote:

> Kirk,
>
> My .profile is
>
> umask 027
> Sys_MPT=$(sysvar SYSNAME)
> echo $Sys_MPT
> echo $HOME/$Sys_MPT/maxdate
> if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
>   /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
>   echo "* The QRadar LEEF file was NOT mounted. *"
>   echo "* A mount command has been issued. *"
>   else
>   echo "* The QRadar LEEF file was ALREADY mounted. *"
> fi
>
> The echo's in STDOUT are:
>
> SYSQ
> /u/c2ecqrlf/SYSQ/maxdate
> * The QRadar LEEF file was ALREADY mounted. *
>
> But STDERR is showing
>
> [: /u/c2ecqrlf/.profile 5: FSUM7351 not found
>
> and the mount was NOT performed.
>
> Something must not be right with my if statement. The if statement works
> when variables are not in the statement.
>


​The first thing that I do when a script is not working correctly is make
the first statement be:

set -x

this will echo each statement to stdout just before it is executed. It
helps me get a better idea what is going on.​

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to