weixin_45210391 2022-04-19 20:48 采纳率: 0%
浏览 2408

shell:tcsh脚本错误set: Variable name must begin with a letter

在Xshell下运行psipred的程序runpsipred_single,代码如下:
#!/bin/tcsh

# This is a simple script which will carry out all of the basic steps
# required to make a PSIPRED prediction. Note that it assumes that the
# following programs are available in the appropriate directories:
# seq2mtx - PSIPRED V4 program
# psipred - PSIPRED V4 program
# psipass2 - PSIPRED V4 program

# NOTE: Script modified to be more cluster friendly (DTJ April 2008)

# Where the PSIPRED V4 programs have been installed
set execdir =./bin

# Where the PSIPRED V4 data files have been installed
set datadir =./data

set basename = $1:r
set rootname = $basename:t
set outname = $basename.chk

# Generate a "unique" temporary filename root
set hostid = `hostid`
set tmproot = psitmp$$$hostid

echo "Generating mtx file from sequence" $1 "..."

$execdir/seq2mtx $1 > $tmproot.mtx

if ($status != 0) then
    echo "FATAL: Error whilst running makemat - script terminated!"
    exit 1
endif

echo "Predicting secondary structure based on single sequence ..."

echo Pass1 ...

$execdir/psipred $tmproot.mtx $datadir/weights.dat $datadir/weights.dat2 $datadir/weights.dat3 > $rootname.ss

if ($status != 0) then
    echo "FATAL: Error whilst running psipred - script terminated!"
    exit 1
endif

echo Pass2 ...

$execdir/psipass2 $datadir/weights_p2.dat 1 1.0 1.0 $rootname.ss2 $rootname.ss > $rootname.horiz

if ($status != 0) then
    echo "FATAL: Error whilst running psipass2 - script terminated!"
    exit 1
endif

# Remove temporary files

echo Cleaning up ...
\rm -f $tmproot.* error.log

echo "Final output files:" $rootname.ss2 $rootname.horiz
echo "Finished."


运行结束后得到以下结果:set: Variable name must begin with a letter。
请问问题出在哪里呢?应该怎么调整呢?
  • 写回答

2条回答 默认 最新

  • IT民工金鱼哥 运维领域新星创作者 2022-04-20 09:10
    关注

    已经提示你了,set,设置变量只能为 字母。
    所以,你现在需要搞清楚 set的用户 ,
    没特别需要,在SHELL 中,可用直接变量定义,例如你上面不用写set,直接定义变量:
    execdir=./bin

    评论

报告相同问题?

问题事件

  • 创建了问题 4月19日

悬赏问题

  • ¥15 设计一个线控耳机音响系统满足以下全部功能
  • ¥60 求直线方程 使平面上n个点在直线同侧并且距离总和最小
  • ¥50 java算法,给定试题的难度数量(简单,普通,困难),和试题类型数量(单选,多选,判断),以及题库中各种类型的题有多少道,求能否随机抽题。
  • ¥50 rk3588板端推理
  • ¥250 opencv怎么去掉 数字0中间的斜杠。
  • ¥15 这种情况的伯德图和奈奎斯特曲线怎么分析?
  • ¥250 paddleocr带斜线的0很容易识别成9
  • ¥15 电子档案元素采集(tiff及PDF扫描图片)
  • ¥15 flink-sql-connector-rabbitmq使用
  • ¥15 zynq7015,PCIE读写延时偏大