随笔分类 - shell基础
摘要:一、cut(截取) 1、按字节截取(-b) 例:/etc/passwd文件截取 head -5 passwd | cut -b 1-4 >截取1-4的字节 head -5 passwd | cut -b 4 >截取第四个字节 head -5 passwd | cut -b -4 >截取1-4的字节
阅读全文
摘要:1、shell介绍 通常说的shell就是shell脚本,他是一门脚本语言,弱类型 2、shell规范 第一行内容为#!/bin/bash #注释 文件以“.sh”结尾的文件 3、shell语法 变量 1、变量名=变量值(等于号两遍没有空格) a=xiaohuihui 2、变量名规范:不能以数字开头
阅读全文
浙公网安备 33010602011771号