Linux 练习 5
课前:课本 121-125 练习下 sed 文本编辑
一、 Linux 下执行 Shell 脚本的方式:
1、用 shell 程序执行脚本:
a、根据你的 shell 脚本的类型,选择 shell 程序,常用的有 sh,bash,tcsh 等
b、程序的第一行#!/bin/bash 里面指明了 shell 类型的,比如#!/bin/bash 指明是 bash,#!/bin/sh
则是 sh;
c、然后输入命令(其中 bash 为 shell 的名称,myshell.sh 则为你要执行的代码):bash
myshell.sh