赞
踩
目录
关于在Linux用pyinstaller打包请看https://blog.csdn.net/weixin_68360041/article/details/136399184?spm=1001.2014.3001.5501
进入创建文件夹的目录的终端,创建空白文件。
- # 创建一个xxx.sh 文件
- [root@debian~]# touch Helloword.sh
-
- # 编辑xxx.sh 文件
- [root@debian~]# vim xxx.sh
- [root@debian~]# cat xxx.sh
- #!/bin/bash
-
- echo "hello world"
-
-
- # 赋予执行权限
- [root@debian~]# chmod o+x xxx.sh
-
- # 运行xxx.sh 脚本
- [root@debian~]# ./xxx.sh
- hello world
-

右击进入文本编辑,或者进入vi、vim编辑器 ,输入#!/bin/bash作为文件开头,保存文件就是shell文件了,再在其中添加命令。
#!/bin/bash
- #!bin/bash
-
- ./manage runserver --noreload
cd 定位到文件的绝对位置
- #!bin/bash
-
- cd /绝对路径/.../可执行文件名
-
- ./manage runserver --noreload
右击出现“作为程序运行”,没有就打开属性,有个“作为程序运行”的按键,打开就好咯
也可以用终端打开,终端定位到xxx.sh的目录下
[root@debian~]# ./xxx.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。