Fork me on GitHub

Linux学习 -- Shell基础 -- 概述


Shell是什么?

  命令解释器

  编程语言

 

Linux支持的Shell类型

  cat /etc/shells

 

  主要学习 bash

 


脚本执行方式

  echo 

  echo -e

    单引号 -- 原始字符串  双引号 -- 支持转义字符串

    \e[1;31m xxx  开启颜色

    \e[0m     关闭颜色

  首行:#!/bin/bash

     #写好注释

  执行方式:

    方式1 sh xxx.sh

    方式2 chmod 755 xxx.sh  ./xxx.sh 或 绝对路径

  


 

posted @ 2015-10-16 21:51  Roronoa__Zoro  阅读(120)  评论(0编辑  收藏  举报