|
有这样的一段shell小程序:
#!/bin/bash #原文是#!/usr/bin/csh
echo " lease enter a number.."
set i=$<
if ( $ i< 20 )then
echo "$ i is less than 20"
else if ( $ i==20 ) then
echo "$ i is equal to 20"
else
echo "$ i is greater than 20"
endif
这段小程序不能执行,显示执行结果如下:
bash: ./a: cannot execute binary file
还有 set i=$ < 单独也不能执行 其执行结果如下:bash: syntax error near unexpected token `newline`
恭请高手指点迷津,先行谢过!! |
|