xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

IoT & Raspberry Pi

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

https://www.cnblogs.com/xgqfrms/p/9546961.html

https://www.cnblogs.com/xgqfrms/p/9551553.html

https://www.cnblogs.com/xgqfrms/p/9626636.html

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 发布文章使用:只允许注册用户才可以访问!


posted @ 2019-05-17 22:21  xgqfrms  阅读(114)  评论(3编辑  收藏  举报