跳至内容
九溪
溪水润知林,滴露启慧心
用户工具
登录
站点工具
搜索
工具
显示页面
过去修订
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
Home
»
知识标签
»
Linux
»
shell脚本与运行
您的足迹:
wiki:linux:sh-run
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== shell脚本与运行 ====== ===== .sh 脚本 ===== 一个典型的sh脚本示例: <code bash hello.sh> #!/bin/bash ls -all </code> ===== 运行 .sh ===== 以运行 hello.sh 为例: 一、直接./加上文件名.sh,如运行hello.sh为./hello.sh【hello.sh必须有x权限】 chmod u+x hello.sh ./hello.sh 二、直接sh 加上文件名.sh,如运行hello.sh为sh hello.sh【hello.sh可以没有x权限】 sh hello.sh 三、绝对路径执行 .sh 这样 /home/hello.sh 或者 ./home/hello.sh 或者 sh /home/hello.sh ===== 应用场景 ===== - [[.auto-backup-use-jianguoyun]]
wiki/linux/sh-run.txt
· 最后更改: 2023/01/03 15:25 由
127.0.0.1
页面工具
显示页面
过去修订
反向链接
回到顶部