zoukankan      html  css  js  c++  java
  • 【shell脚本学习-2】

    #!/bin/bash - #echo do you have exetuate this project printf "please input your passwd" stty -echo read pass < /dev/tty printf "please agein input your passwd" read pass2 < /dev/tty stty echo #tr -s > 1.txt | sort > 2.txt #echo "1 6 8 1 4 9" > 1.txt | sort 1.txt | tail 1.txt #cat /dev/null #!/bin/bash #cat /bin/liupeng | grep a | wc #$1 #read $x #echo $x #set -x #跟踪 #echo firset echo #set +x #取消跟踪 #echo second echo #locale -a | grep "^L" #环境变量 #LC_ALL=da locale ck LC_TIME ######------------------------------grep+正则表达式-----------------------------# #who | grep -F u1 #判断登录用户 #cat 1.txt | grep ^a | grep b$ #cat 1.txt | grep Aa.Aa #[Aa]d #含有Aa的字符 #cat 1.txt | grep ^Aa #以Aa开头的字符 #cat 1.txt | grep Aa$ #以Aa结尾的字符 #cat 1.txt | grep [[:digit:]] | grep ^2 #匹配含有数字的行列 #cat 1.txt | grep [[:alnum:]] #cat 1.txt | grep digit #cat 1.txt | grep ab*c #匹配含有一个a额字符 #cat 1.txt | grep [[:upper:]]{3}$ #匹配后三位为大写的字符 #cat 1.txt | grep ab?c #匹配ab和abc #cat 1.txt | grep ab+c #----------------------------------sed+正则表达式_______________________________ #sed 's/:.*//' /root/1.txt #find /root -type d -print #mkdir -p /home/1 #sed 's;/home/1;/home/2;' # cat /root/1.txt | sed 's/a/B/g' #替换字符 #n #printf "hello world" #sed -n '/c/p' *.txt #sed -n '$p' "$1" #sed -n '2,5p' /root/1.txt #匹配打印的行数 echo "hello world" | sed 's/world/shell/' #替换指定的字符
    要保持着对知识的渴求,给自己充电,不要这荒废了短暂的时光;
  • 相关阅读:
    四种常见的 POST 提交数据方式
    HTTP 协议中的 Transfer-Encoding
    一些安全相关的HTTP响应头
    密钥交换(密钥协商)算法及其原理
    SSL/TLS协议详解(下)——TLS握手协议
    SSL/TLS协议详解(中)——证书颁发机构
    SSL/TLS协议详解(上):密码套件,哈希,加密,密钥交换算法
    Maven的-pl -am -amd参数
    关于Sidecar Pattern
    Java Reference核心原理分析
  • 原文地址:https://www.cnblogs.com/activecode/p/9526393.html
Copyright © 2011-2022 走看看