#!/bin/bash -
#echo do you have exetuate this project \n
printf "please input your passwd"
stty -echo
read pass 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/' #替换指定的字符

最新文章

  1. 如何使用Python在Kaggle竞赛中成为Top15
  2. JVM 平台上的各种语言的开发指南
  3. 正则表达式匹配/data/misc/wifi/wpa_supplicant.conf的WiFi名称与密码
  4. JSP 相关试题(一)
  5. linux中ls命令详解 (转)
  6. 理解c++11正则表达式 (1)
  7. Linq101-Ordering
  8. ZOJ 1859 Matrix Searching(二维线段树)
  9. PIC32MZ Live update bootloader
  10. UE4帧动画Matineed
  11. [洛谷P2107] 小Z的AK计划
  12. 查看Python、flask 版本
  13. LR常用函数
  14. c# 遍历所有安装程序 获取所有已经安装的程序
  15. 简明 Vim 练级攻略------转自陈皓coolshell
  16. Git学习系列之CentOS上安装Git详细步骤(图文详解)
  17. D3D9 effect (hlsl)(转)
  18. 用OpenGL进行曲线、曲面的绘制
  19. Paxos算法简单陈述
  20. BlueMind 3.0.17 发布,消息和协作平台

热门文章

  1. PLSQL Developer中几个功能
  2. Oracle运行依赖的服务
  3. 使用embeded tomcat进行嵌入式javaee开发-启动tomcat
  4. t d x 示例z
  5. npm run dev运行Vue项目报错:Node Sass does not yet support your current environment
  6. (转)Wireshark基本介绍和学习TCP三次握手
  7. 【转】Android总结之drawable(hdpi,mdpi,ldpi)文件夹的使用
  8. [19/03/17-星期日] 常用类_Calendar日历类&GregorianCalendar公历日历类
  9. Linux使用sz、rz命令下载、上传文件
  10. 七、IntelliJ IDEA 常见文件类型的图标介绍