shell-创建文件夹和文件
知识点: if条件语句。 for循环语句。 #!/bin/sh # cd /var/www/shell if [ ! -d file ] then mkdir file fi cd file for ((i=0; i<10; i++));do if [ ! -f file_{$i}.txt ] then touch file_$i.txt fi done
--我是一个有上进心的程序猿,但是我想种一个果园。
每天一个SHELL
知识点: if条件语句。 for循环语句。 #!/bin/sh # cd /var/www/shell if [ ! -d file ] then mkdir file fi cd file for ((i=0; i<10; i++));do if [ ! -f file_{$i}.txt ] then touch file_$i.txt fi done
准备工作: 配置文件放在/etc/php-fpm.conf 端口设为9000。 将php-fpm进程文件设为/var/run/php-fpm.pid。 sudo mkdir /etc/init.d sudo vim /etc/init.d/php-fpm #!/bin/sh # # Simple php-fpm init script conceived to work on Unix # as it dose use of the /proc fileSystem EDISPORT=9000 EXEC=/usr/sbin/php-fpm #STOP=kill...