且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

csh 脚本:检查命令是否存在

更新时间:2023-11-25 22:48:58

我的问题是使用 where 命令解决的(我尝试使用 which 命令).解决方案:

My problem is solved using where command (I was trying with which command). Solution:

   if(`where test_cmd` == "") then
      printf "
test_cmd: Command not found
";
      exit(1);
   endif

谢谢