Hi, Steven and Cameron,
Thanks for getting me started on translating scripts from csh to sh.
After reading some manuals, I thought I had translated everything OK,
but in fact, I haven't. When I try to run the sh script, I get this
error:
./msi_lic_bash: [: missing `]'
./msi_lic_bash: [: too many arguments
./msi_lic_bash: [: too many arguments
./msi_lic_bash: [: missing `]'
What could these errors mean? I've gone through the script and checked
that all "[" were paired with "]". Also, I'm not entirely sure about
the translation of the following csh block:
if (-e $rel_data) then
set lic_pack = `cat $rel_data | egrep "^MSI_LIC_PACK_DIR"`
if !($status) then
set lp_dir = `echo $lic_pack | awk -F: '{print $2}'`
set lic_dir = $lp_dir/licenses
setenv MSI_LIC_PACK_DIR $lp_dir
endif
endif
I don't know quite what to do with the line "if !($status) then".
Thanks for any tips,
Hidong
"Steven W. Orr" wrote:
>
> if [ ${BIOSYM:=undefined} == undefined ]
> then
> cat << EOF
> \*\*
> \*\* Variable BIOSYM undefined
> \*\* You need to source the cshrc file that comes with the CNX
> \*\* installation. Refer to the CNX documentation.
> \*\*
> EOF
> exit 1
> fi
>
> echo -n "Enter location of CNX directory [default: ${cnx_dir} ]-> "
> read
> if [ -n "$REPLY" ]
> then
> cnx_dir=$(echo ${REPLY%*/})
> fi
>
> --
> -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED]
> -Stranger things have happened but none stranger than this. Steven W. Orr-
> Does your driver's license say Organ Donor?Black holes are where God \
> -------divided by zero. Listen to me! We are all individuals!---------
>
> On Mon, 21 Feb 2000, Hidong Kim wrote:
>
> =>Hi,
> =>
> =>How would you convert the following two csh script blocks to bash
> =>script?
> =>
> =>if !($?BIOSYM) then
> => echo "** "
> => echo '** Variable $BIOSYM undefined'
> => echo '** You need to source the cshrc file that comes with the CNX'
> => echo '** installation. Refer to the CNX documentation.'
> => echo "** "
> => exit 1
> =>endif
> =>
> =>echo -n "Enter location of CNX directory [default: $cnx_dir ]-> "
> =>set response=$<
> =>if ( $response != "" ) then
> => set cnx_dir=`echo $response | sed -e 's/\/$//'`
> =>endif
> =>
> =>
> =>Thanks,
> =>
> =>
> =>
> =>Hidong
> =>
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.