linux下常用文本处理命令
来源:互联网 发布:百度云盘加载数据失败 编辑:程序博客网 时间:2024/06/05 09:10
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,3echo "a b c d e f" | cut -d" " -f1echo "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之间的所有字符
(未完待续)
0 0
- Linux下常用文本处理命令
- Linux下常用文本处理命令
- linux下常用文本处理命令
- Linux常用文本处理命令
- Linux文本处理命令
- Linux文本处理命令
- Linux文本处理命令
- Linux文本处理命令
- Linux 文本处理命令
- Linux文本处理命令
- Linux文本处理命令
- linux 文本处理命令
- linux 文本处理命令
- Linux 中常用的文本(行)处理命令
- Linux 中常用的文本(行)处理命令
- Linux 中常用的文本(行)处理命令
- Shell 常用文本处理命令
- linux下常用文本编辑器的控制台启动命令
- python dic与str的相互转化
- LeetCode之路:389. Find the Difference
- Linux文件或目录的读,写,执行权限
- 【C语言】ABACADACAB编程问题
- 读书感悟:如何最高效的读完一本书
- linux下常用文本处理命令
- Android之Content和activity、service、Application关系和attachBaseContext函数调用的时候
- 18.[个人]C++线程入门到进阶(18)----线程函数:SuspendThread
- mnist deep convolutional cetwork源码说明
- opencv中houghlines函数返回的rho和theta
- 你好,再见;你好,幸会!
- 【C语言】C语言中3种作用域举例
- Caffe源码解读(十一):自定义一个layer
- linux shell脚本对未定义变量的判断以及if的用法