linux下常用文本处理命令
2017-04-27 22:33
591 查看
echo display a line of text
格式:echo [SHORT/LONG-OPTION]… [STRING]echo "a b c d e f"
结果为:a b c d e f
cut remove sections from each line of files
说白了就是切割字符串echo "a b c d e f" | cut -d" " -f1,2,3 echo "a b c d e f" | cut -d" " -f1 echo "a b c d e f" | cut -d" " -f1-3
结果为:
a b c
a
a b c
这句命令中先获取一个字符串 通过管道命令作为cut命令的入参
-d# : 以#去分割字符串,这里以空字符串“ ”
-f # : 字符串被切割后回形成一个类似数据的数据结构,通过这个命令可以指定获得索引为#的内容
-f #1-#2 获得从索引#1到索引#2之间的所有字符
(未完待续)
相关文章推荐
- Linux常用文本处理命令
- Linux中常用命令之一——文本处理
- Linux下常用文本处理命令
- Linux下常用文本处理命令
- Linux下常用文本处理命令
- Linux下常用文本处理命令
- Linux中常用命令之一——文本处理
- Linux 中常用的文本(行)处理命令
- Linux文本处理常用命令
- linux系统常用的文本查看及处理命令
- Linux常用文本处理命令
- Linux下常用文本处理命令
- linux常用文本处理命令笔记整理
- Linux 中常用的文本(行)处理命令
- Linux下常用文本处理命令
- Linux中常用命令之一——文本处理
- Linux文本处理常用命令
- Linux下常用文本处理命令
- Linux中关于文本查看和处理的常用命令
- Linux 入门常用命令 — 文本处理