文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>A script that generates another script

A script that generates another script

时间:2006-08-25  来源:huanghaojie

#!/bin/sh
OUT=ge.sh
(
cat <<'EOF'
#!/bin/sh
echo "this is gerenate shell script"
a=7
b=3
let "c = $a * $b"
echo "c = $c"
EOF
) >$OUT

[ -f "$OUT" ] && chmod 755 $OUT
[ ! -f "$OUT" ] && echo "no $OUT file" ## 最后两句可写成如下

#if [ -f "$OUT" ]
#than
#   chmod 755 $OUT
#else
#   echo "no $OUT file"
相关阅读 更多 +
排行榜 更多 +
别惹神枪手安卓版

别惹神枪手安卓版

冒险解谜 下载
坦克战争世界

坦克战争世界

模拟经营 下载
丛林反击战

丛林反击战

飞行射击 下载