2.第一个脚本
第一个脚本
1、第一个脚本
1.#!/bin/bash
2.echo 'hello world!'1.[root@localhost lcr]# vim helloworld.sh
2.[root@localhost lcr]# ./helloworld.sh
3.bash: ./helloworld.sh: 权限不够1.[root@localhost lcr]# chmod +777 ./helloworld.sh1.[root@localhost lcr]# chmod +x ./helloworld.sh1.[root@localhost lcr]# ./helloworld.sh
2.hello world!
2、运行 Shell 脚本有两种方法:
1.作为可执行程序
2.作为解释器参数
Last updated