文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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"
相关阅读 更多 +
排行榜 更多 +
3d射击球球手机游戏

3d射击球球手机游戏

飞行射击 下载
王铲铲的运河梦折相思内置菜单

王铲铲的运河梦折相思内置菜单

休闲益智 下载
星座乐消消游戏

星座乐消消游戏

休闲益智 下载