且构网

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

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

更新时间:2023-11-25 22:35:34

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

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

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

谢谢