#!/bin/csh
set passFail_file = "name"
set numErrs = `/bin/grep -c ERROR $passFail_file`
echo "numErrs is $numErrs" # displays numErrs is 0, which isn't always correct
set dirLocale = `/bin/sed q $passFail_file` #capture line 1 in file, which is nonBlank
echo "dirLocale is $dirLocale" # displays: dirLocale is
当我运行上面的脚本时,我无法分配dirLocale。在csh中是否有等效的eval?语法是什么?我想我错过了反引号和操作顺序的混合。
答案 0 :(得分:0)
系统表现得很奇怪。一切都很好,使用上面的语法。问题已结束。谢谢。