1、创建文件 .sh 文件
本例,将 sh 文件全名为 demo.sh,接下来使用随意熟悉的编辑器编辑命令就可以
2、编写 .sh 文件
#!/bin/sh
echo +----------------------------------------------------------+
echo + A tools for post csdn blogs and input the key as fllow: +
echo + digg [Digg all blogs] +
echo + views [view all blogs] +
echo + read id [read one blogs] +
echo + exports [exports all blogs] +
echo + publish filename [publish blogs] +
echo + publishes filename [bat publish blogs] +
echo + login account password [login csdn] +
echo +----------------------------------------------------------+
printf "Input your order which num is contained on above:"
read order
php do.php $order
3、运行 sh 文件
运行方式
./demo.sh
只是,在这里,可能会提示无权限,这时须要改动一下文件的权限就可以,命令为
chmod 777 run.sh
时间: 2025-01-17 13:02:49