shell

作者: 低调而响亮的昵称 | 来源:发表于2018-12-15 17:25 被阅读0次

a="abc" 双引号是字符串

a=(1 2 3) 括号是数组

shell等号字符串命令不能加空格

·ls· 反单引号 把内部命令转换成字符串

echo `ls` 会把当前目录文件夹信息打印出来

除法保留小数的命令:借用awk自带命令:

    `awk "BEGIN{print \"$var_a\"/\"$var_b\"}"`

grep:截取文本段落

    -o只截取出来想要的那一部分

    -i截取想要部分所在的一段

sed 替换文本:/s/to/from test.sh 把test.sh文件中的to替换成from

相关文章

  • Shell 学习

    shell 变量 shell 参数传递 shell 数组 shell 运算符 shell echo 命令 prin...

  • Shell 概述

    学习 Shell 主要包括的内容: Shell 脚本入门 Shell 变量 Shell 内置命令 Shell 运算...

  • Shell 教程

    Shell 变量 Shell 传递参数 Shell 数组 Shell 基本运算符 Shell echo 命令 Sh...

  • shell 第一天

    shell编程初识 1.1 shell编程初识 shell的定义 Shell 是命令解释器 Shell 也是...

  • shell 案例

    Shell编程一 Shell防范ARP攻击 Shell编程二 Shell防范DDos攻击 Shell编程三 ...

  • 【生物信息笔记】shell 脚本 (dry-2)

    shell 和 shell script(脚本)区别: shell 和 shell 脚本是两个不同概念,shell...

  • Linux Shell:基础知识和Shell变量

    摘要:Linux,Shell 整理Shell内容要点: Shell基础知识 Shell变量的类型 Shell变量赋...

  • Shell脚本语言一

    一、语法 格式 运行 Shell变量 Shell字符串 Shell数组 Shell注释 Shell传递参数 She...

  • 使用shell脚本

    使用方式 shell 变量 shell 字符串操作 shell 数组 shell 注释 shell 命令行参数 s...

  • vim学习 09——shell命令

    vim学习 09——shell命令 执行 shell 命令 :!shell命令 : 可以执行 shell 命令。 ...

网友评论

      本文标题:shell

      本文链接:https://www.haomeiwen.com/subject/tjxphqtx.html