IoT & Raspberry Pi Linux Shell chmod 777 IoT,Raspberry pi,Linux Shell,web,shell,bash, chmod +x, chmod 777, chmod, bash,



IoT & Raspberry Pi

​https://www.raspberrypi.org/​

​https://www.raspberrypi.org/training​

​https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started​



chmod

linux & chmod 777 & chmod +x

javascript:void(0)

javascript:void(0)

javascript:void(0)

​https://github.com/xgqfrms-GitHub/Node-CLI-Tools/blob/master/bash-shell-chmod.md​



#!/bin/sh

# echo "^-v-^ JSON DB is running in development env!" && npm run db

# echo "^-v-^ JSON DB is running in development env!" && nodemon -w ./server.js localhost 8888

JSONDB="nodemon -w ./server.js localhost 8888"

${JSONDB} &
# chmod +x db.sh
# OR
# chmod 777 db.sh

# sudo ./db.sh
# nodemon -w ./server.js localhost 8888

# /bin/sh db.sh

# ps -ef | grep node
# sudo kill -9 <PID>


Linux Shell

编写首个Shell脚本

打开你使用的文本编辑器,粘贴如下内容:

#!/bin/bash
echo "Hello World!"


将其保存成 1st.sh 再执行看看效果:

chmod 755 1st.sh

./1st.sh


执行成功了,是不是非常简单。

下面我们再建立一个 2nd.sh 并粘入如下内容:


#!/bin/bash
echo "What is your name?"
read a;
echo "Hey $a! what is your Favorite Website?"
read b;
echo -e "That's Nice to know @$a that $b is your favorite Website"





©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!



xgqfrms