LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3517|回复: 12

Command not found!!??

[复制链接]
发表于 2003-12-27 20:57:42 | 显示全部楼层 |阅读模式
[huasen@TheOne huasen]$ sh proewildfire
./proewildfire: line 1: setenv: command not found
./proewildfire: line 2: setenv: command not found
: command not founde 3:
: command not founde 4:
: command not founde 6:
'/proewildfire: line 7: syntax error near unexpected token `then
'/proewildfire: line 7: `if ($mc =~ sgi*) then
[huasen@TheOne huasen]$
[huasen@TheOne huasen]$csh proWildfire
prodir:Undefined Variable
[huasen@TheOne huasen]$
[huasen@TheOne huasen]$ sh setup
: command not found
./setup: line 78: syntax error near unexpected token `elif'
'/setup: line 78: `  elif [ "$1" = "?" -o "$1" = "-h" -o "$1" = "-help" ]

[huasen@TheOne huasen]$csh setup
:Command not found
:Command not found
:Command not found
fullsrcname:Undefined Variable
:Command not found
fullsrcname:Undefined Variable
:Command not found
fullsrcpath:Undefined Variable
[huasen@TheOne huasen]$
請去掉附件的擴展名

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2003-12-27 20:59:23 | 显示全部楼层
setup

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2003-12-27 21:07:47 | 显示全部楼层
proewildfire的內容如下:
setenv CV_ENV_HOME $prodir/$mc/CV110
setenv PTC_CVLIB ${CV_ENV_HOME}/usr/apl/cvdors/lib{CV_ENV_HOME}/usr/apl/cvdors/stubs


# ptc-cmdtype: proe

if ($mc =~ sgi*) then
   unsetenv XUSERFILESEARCHPATH
   setenv GLMGRARRAYOPT 1
endif
if ($mc == ibm_rs6000) then
   setenv PRO_DUMPCATIA_PATH $prodir/$mc/obj
endif
if ($mc == alpha_unix) then
    limit datasize unlimited
    limit stacksize unlimited
endif
if ($mc =~ hp*) then
    setenv _VFORK_NO_CMA true
endif





if ( ! $?CDRS_DATA) then
    setenv CDRS_DATA $prodir
endif
setenv PRO_IMAGE_CONVERTER $prodir/$mc/obj/convert_image
setenv PRO_PHOTORENDER $prodir/$mc/obj/PhotoRender

if (-e $prodir/install/unix/pro_mech_loc.csh) then
    setenv PRO_MECH_COMMAND $0
    source $prodir/install/unix/pro_mech_loc.csh
    if (-e $MECH_LP/install/unix/pro_mech_env.csh) then
        source $MECH_LP/install/unix/pro_mech_env.csh
    endif
endif

setenv GALAXYHOME $prodir/$mc

setenv PRO_COMM_MSG_EXE $prodir/$mc/obj/pro_comm_msg
setenv PROE_START $0
setenv SPG_DIRECTORY $prodir
setenv PRO_USRMAIN $prodir/usrprog/umain/usrmain.c
setenv PROTABLE_DIRECTORY $prodir/protable
setenv PROTAB $prodir/$mc/obj/protab
setenv CLHOME $prodir/text/pcldata
setenv PVIEW_PVEXPORT_HOME $prodir/apps/prodview
setenv VC_VCONF_START $prodir/$mc/obj/ptcvconf
setenv ZIP_EXEC $prodir/$mc/obj/zip
setenv MOZ_PLUGIN_PATH $prodir/$mc/obj/J2RE131/plugin/platform/ns600
setenv PVX_PATH $prodir/xplatform/jar/nodebug

setenv PROE_FEATURE_NAME "ROE_200 ()"


$prodir/$mc/obj/pro $*
exit $status
 楼主| 发表于 2003-12-27 21:08:54 | 显示全部楼层
setup的內容如下:
#!/bin/sh -f
#=============================================================
# MODIFICATIONS
# ---------------------------------------------------------
# 06-Oct-97 $$1  JJE  Created.
# 28-Oct-97 $$2  JJE  Use -dirs
# 05-Dec-97 $$3  JJE  Remove -vrdirs, set LC_NUMERIC to C
# 22-Dec-97 $$4  JJE  Check DISPLAY
# 05-Jan-98 $$5  JJE  ignore
# 13-Jan-98 $$6  JJE  Use delta lib
# 22-Jan-98 $$7  JJE  Add . to path on sgi
# 23-Jan-98 $$8  JJE  Add startup messages
# 27-Jan-98 $$9  JJE  Add cr
# 31-Jan-98 $$10 JJE  Don't echo argv
# 23-Feb-98 $$11 ZRL  Added remote install
# 06-Apr-98 $$12 JJE  Add sgi_mips4
# 22-Jun-98 $$13 ZRL  removed galaxy library
# 29-Jun-98 ##14 ZRL  use galaxy library only on sgi_elf2
# 11-Aug-98 $$14 JJE  Fix remote install for mips4
# 22-Oct-98 $$15 TWH  Fixed remote install
# 11-Nov-98      TWH  Fixed cleanup
# 20-Nov-98 $$16 TWH  Fixed Trusted login check for Sun
# 08-Sep-99 $$17 JJE  Migrate to new installer
# 20-Oct-99 $$18 MYA  Add DPS_DIRECTORY
# 07-Aug-00      TWH  Check if hpux11_pa32 exists
# 22-Aug-00 $$19 TWH  rewritten to /bin/sh for multicd
# 18-Sep-00 $$20 TWH  support non \c echo; -multicd iff using redirect
# 09-Oct-00 $$21 TWH  Fix command-line args; fix PROSETUP_EXE bug
# 31-Oct-00 $$22 TWH  Fix for $0 == "setup"
# 17-Jan-01 $$23 TWH  always run sun4_solaris instead of _64 this script
# 16-May-01 $$24 TWH  always run hpux11_pa32 instead of hpux_pa64
# 13-Jun-02 $$25 JJE  Support -64 arg
# 16-Jul-02 $$26 TWH  Set TMP & TEMP if not set
# 20-Aug-02 $$27 TWH  Fix #26
# 26-Aug-02 $$28 TWH  Another fix for #26
# 23-Jan-03 J-03-41  $$29  MAZ  Support PROSETUP_EXE in multicd mode
#=============================================================

rundir=`pwd`
fullscrname=$0
# :t
scrname=`echo $fullscrname | awk -F"/" '{ print $NF}'`
# :h
fullscrpath=`echo $fullscrname | awk -F"/" '{ ORS="/"} { n=split($0,A)} { for (i = 1; i < n; i++) print A }'`
if [ "$fullscrpath" = "" ]
then
  fullscrpath=$0
else
  fullscrpath=`echo $fullscrpath | awk '{ n=length($0)} { n -= 1} { print substr($0,1,n)}'`
fi

if [ "$fullscrpath" = "$fullscrname" ]
then
  fullscrpath=`pwd`
else
  cd $fullscrpath
  fullscrpath=`pwd`
fi

echostr=`echo "test \c"`
if [ "$echostr" = "test \c" ]
then
  alt_echo=true
fi

bit_mode_64=false
other_args=""
i=1
while [ "$i" -le $# ]
do
  if [ "$1" = "-display" ]
  then
    shift
    echo "setting DISPLAY to: $1"
    DISPLAY="$1"
    export DISPLAY
    shift
  elif [ "$1" = "?" -o "$1" = "-h" -o "$1" = "-help" ]
  then
    echo ""
    echo "Usage: $scrname [ -display unix:0 ]"
    exit 0
  elif [ "$1" = "-remote" ]
  then
    echo ""
    echo "Sorry, remote installation is not supported in this release."
    exit 1
  elif [ "$1" = "-cdrom" ]
  then
    shift
    echo "setting CDROM path to: $1"
    fullscrpath="$1"
    shift
  elif [ "$1" = "-64" ]
  then
    shift
    bit_mode_64=true
  else
    other_args="$other_args $1"
    shift
  fi
done

cd $rundir
prodir=$fullscrpath
imagedir=$fullscrpath
getpmtscr="getpmt.csh"

if [ ! -x "$imagedir/$getpmtscr" ]
then
  echo ""
  echo "ERROR:  $imagedir/$getpmtscr - file is missing."
  echo "        Check the name of the CD mount directory."
  exit 1
fi

mctype=`$imagedir/$getpmtscr`
if [ "$mctype" = "UNKNOWN" ]
then
  echo ""
  echo "ERROR:  OS name unknown."
  exit 1
fi

test "$TMP"
if [ $? != 0 ]
then
  if [ -x "/tmp" ]
  then
  TMP="/tmp"
  export TMP
  elif [ -x "/var/tmp" ]
  then
  TMP="/var/tmp"
  export TMP
  fi
fi
test "$TEMP"
if [ $? != 0 ]
then
  if [ -x "/tmp" ]
  then
  TEMP="/tmp"
  export TEMP
  elif [ -x "/var/tmp" ]
  then
  TEMP="/var/tmp"
  export TEMP
  fi
fi
test "$DISPLAY"
if [ $? != 0 ]
then
  echo ""
  echo 'ERROR:  The DISPLAY variable is not set - '
  echo ""
  echo "   Options:"
  echo "      o Press <cr> to set DISPLAY to `hostname`:0.0"
  echo "      o Type a value to use for the DISPLAY variable"
  echo "      o Enter 'q' to abort prosetup"
  echo "      o Specify '-display <host>:0' on the command line"
  echo ""
  test "$alt_echo"
  if [ $? = 0 ]
  then
    echo -n "Set it to (`hostname`:0.0): [q to abort] "
  else
    echo "Set it to (`hostname`:0.0): [q to abort] \c"
  fi
  read line
  if [ "$line" = "q*" -o "$line" = "Q*" ]
  then
    exit -1
  elif [ "$line" = "" ]
  then
    DISPLAY="`hostname`:0.0"
    export DISPLAY
  else
    DISPLAY="$line"
    export DISPLAY
  fi
  echo ""
  echo "   DISPLAY has been set to: $DISPLAY"
  echo ""
fi

echo ""
test "$alt_echo"
if [ $? = 0 ]
then
  echo -n "Starting PTC.Setup, please wait ..."
else
  echo "Starting PTC.Setup, please wait ...\c"
fi

if [ "$mctype" = "sun4_solaris_64" -a "$bit_mode_64" = "false" ]
then
  mctype="sun4_solaris"
fi
if [ "$mctype" = "sun4_solaris" ]
then
  PATH=$PATH:/usr/ucb
  export PATH
fi

if [ "$mctype" = "sgi_elf2" -o "$mctype" = "sgi_mips4" ]
then
  PATH=.PATH
  export PATH
fi
if [ "$mctype" = "hpux_pa64" -a "$bit_mode_64" = "false" ]
then
  mctype="hpux11_pa32"
fi
if [ "$mctype" = "hpux11_pa32" ]
then
  if [ ! -d "$imagedir/dsrc/$mctype" ]
  then
    mctype="hp8k"
  fi
fi

PTC_CDHOME=$imagedir
export PTC_CDHOME
PS_DIRECTORY=$imagedir/dsrc
export PS_DIRECTORY
DPS_DIRECTORY=$imagedir/dsrc
export DPS_DIRECTORY
PRO_MACHINE_TYPE=$mctype
export PRO_MACHINE_TYPE
LC_NUMERIC=C
export LC_NUMERIC

test "$PROSETUP_EXE"
if [ $? != 0 ]
then
  PROSETUP_EXE="$imagedir/dsrc/$mctype/obj/ptcsetup"
elif [ -x "$PROSETUP_EXE" ]
then
  echo ""
  test "$alt_echo"
  if [ $? = 0 ]
  then
    echo -n "Using $PROSETUP_EXE ..."
  else
    echo "Using $PROSETUP_EXE ...\c"
  fi
fi

if [ ! -x "$PROSETUP_EXE" ]
then
  echo ""
  echo "ERROR:  $PROSETUP_EXE - file is missing."
  echo "        Check the name of the CD mount directory."
  exit 1
fi

REDIRECT_EXE="$imagedir/dsrc/$mctype/obj/redirect"
if [ -x "$REDIRECT_EXE" ]
then
  ($REDIRECT_EXE $other_args -multicd ) &
else
  ($PROSETUP_EXE $other_args ) &
fi

echo ""
exit 0
发表于 2003-12-27 22:26:32 | 显示全部楼层
你三楼贴的是CSH脚本,用csh urscript执行,四楼贴的是bash吧,把第一行的#!/bin/sh -f的-f去掉!
 楼主| 发表于 2003-12-28 14:14:14 | 显示全部楼层
问一个很傻的问题?
如所貼proeWildfire中的$mc是命令的值(输出或结果)呢?还是变量的值?
我自己估计$prodir是我Proe的安装目录,而$mc的值应该是”i486_linux”的
但我运行csh proeWildfire时提示
mc:command not found之类的
 楼主| 发表于 2003-12-28 15:20:56 | 显示全部楼层
javalee-Mr.lee說的是對的
我把proeWildfire中那個不知道是什么的$prodir和$mc分別改成
/usr/local/ptc/proeWildfire

i486_linux
后成功運行了(至少運行了倒數第二行的那個pro),
雖然最后還是說share libary即是叫libwincmt.so的一個文件或路?秸也坏
但我想我們現在說的這個無關了

問題是:
setup中去掉#!/bin/sh -f的-f后還是出錯:
[root@LinuxSir huasen]#./setup
:bad interpreter:Not such file or directory
[root@LinuxSir huasen]#
发表于 2003-12-28 15:53:28 | 显示全部楼层
最初由 huasen 发表

setup中去掉#!/bin/sh -f的-f后還是出錯:
[root@LinuxSir huasen]#./setup
:bad interpreter:Not such file or directory
[root@LinuxSir huasen]#

[root@LinuxSir huasen]# . ./setup
 楼主| 发表于 2003-12-30 19:40:47 | 显示全部楼层
最初由 javalee 发表
[root@LinuxSir huasen]# . ./setup


../setup
???!!!
這不是跑到上一層的目錄里了??
那是file not found 而不是interpreter not found了
发表于 2003-12-30 20:13:49 | 显示全部楼层
最初由 huasen 发表
../setup
???!!!
這不是跑到上一層的目錄里了??
那是file not found 而不是interpreter not found了

注意空格!建议你考置顶的贴子看看入门的教程,
[点 文件名 ]也是执行脚本的一种方法.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表