上一页 1 ··· 399 400 401 402 403
摘要: 1、 跳转至最后一行:G (命令模式下G、或者shift+g、 末行模式下输入 “:$”) 跳转至第一行:gg (命令模式下gg ,或者在末行模式下输入 “:0”) 跳转至指定行:10+G (命令模式下键盘输入10,然后大写G; 或者末行模式下输入 “:10”) 向下跳转10行:10+j (命令模式 阅读全文
posted @ 2020-05-01 23:40 小鲨鱼2018 阅读(651) 评论(0) 推荐(0)
摘要: 1、创建测试数据 [root@linuxprobe test]# echo -e "1 2 3 4\n5 6 7 8\n9 5 6 3\n2 3 4 5" > b.txt ##测试数据 [root@linuxprobe test]# cat b.txt 1 2 3 4 5 6 7 8 9 5 6 3 阅读全文
posted @ 2020-03-13 23:37 小鲨鱼2018 阅读(3916) 评论(0) 推荐(0)
摘要: 1、创建了一个示例数据a.txt seq 11 30|xargs -n 5|sed 's/ /\t/g' > a.txt 提取第一列 : cut -f 1 a.txt 提取第2列: cut -f 2 a.txt 提取 1-4列: cut -f 1-4 a.txt 提取 第2列至最后一列: cut - 阅读全文
posted @ 2020-03-06 20:27 小鲨鱼2018 阅读(428) 评论(0) 推荐(0)
摘要: 1、创建测试数据 a.txt [root@linuxprobe test]# seq 10 > a.txt [root@linuxprobe test]# ls a.txt [root@linuxprobe test]# cat a.txt 1 2 3 4 5 6 7 8 9 10 2、利用tee命 阅读全文
posted @ 2018-08-02 08:58 小鲨鱼2018 阅读(38395) 评论(0) 推荐(0)
摘要: 1、利用vim编辑器创建测试文件 [root@linuxprobe test]# cat a.txt e d 4 9 s y k m 2 r t s w d g h e t k r 2、提取特定行 最简单的用法,提取包含特定字符串的行,例如提取包含字符串k的行: [root@linuxprobe t 阅读全文
posted @ 2018-07-31 11:10 小鲨鱼2018 阅读(2895) 评论(0) 推荐(0)
摘要: vim 命令删除特定行: 首先 vim filename 进行命令模式: dd: 删除 光标所在的整行; d1G:删除光标所在行到第一行的所有数据; dG: 删除光标到最后一行的所有数据 ; 3dd:删除光标所在行向后的3行;(3可以替换为任意数字) 3D:同3dd,删除光标所在行向后3行(包含光标 阅读全文
posted @ 2018-07-28 20:32 小鲨鱼2018 阅读(4022) 评论(0) 推荐(0)
上一页 1 ··· 399 400 401 402 403