shell编程 1 概述

一,shell的简介
  shell是命令解释器,shell分为B shell和C shell,我们通常用到的是base shell



二,shell脚本的执行方式
   echo 输出 echo -e 格式转换
   echo -e "ab\b\c"   \b向前面删除一个字符 删除为ac
   shell脚本中必须有#!/bin/bash

   chmod 755 hello.sh 给hello.sh赋予755的权限

   执行的方式 ./hello.sh  或者 sh hello.sh 或者bash  hello.sh


三,shell的基本功能
   etc/profile是环境变量配置文件
   history默认保存1000条命令
   1,history -c 清空历史命令(建议不清空)
     history -w 将刚敲入的命令写入base_history文件中


  

猜你喜欢

转载自jianhao-wang.iteye.com/blog/2238256