上一页 1 ··· 295 296 297 298 299 300 301 302 303 ··· 408 下一页
摘要: 1、别名配置文件为 ~/.bashrc. 例如将:为‘echo $?’命令指定别名为q: [root@centos79 ~]# vim ~/.bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias c 阅读全文
posted @ 2021-07-05 18:57 小鲨鱼2018 阅读(560) 评论(0) 推荐(0)
摘要: 1、tr命令 -s 参数将多个连续的字符压缩为一个字符 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt aaabbbaaaccc a a bbbb ddddcccc [root@centos79 test]# tr -s 阅读全文
posted @ 2021-07-05 18:20 小鲨鱼2018 阅读(1105) 评论(0) 推荐(0)
摘要: 1、split按文件大小拆分文件 测试数据如下: [root@centos79 test]# dd if=/dev/zero bs=1M count=100 of=a.txt 100+0 records in 100+0 records out 104857600 bytes (105 MB) co 阅读全文
posted @ 2021-07-05 17:33 小鲨鱼2018 阅读(336) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@centos79 test]# cat a.txt a g a d g d a d g d g e g d a a a a d g d a a [root@centos79 test]# awk -F "a" '{print NF - 1}' a.txt ## 统计每行a出 阅读全文
posted @ 2021-07-05 00:03 小鲨鱼2018 阅读(252) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@centos79 test]# ls a.txt b.txt [root@centos79 test]# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 [root@centos79 test]# cat b.txt b1 b2 b3 b4 阅读全文
posted @ 2021-07-05 00:00 小鲨鱼2018 阅读(178) 评论(0) 推荐(0)
摘要: 1、删除开头的空行 [root@centos79 test]# cat a.txt a g r e i x k like a f g liker a g r e a f g liker [root@centos79 test]# cp a.txt a.txt.bak [root@centos79 t 阅读全文
posted @ 2021-07-04 23:38 小鲨鱼2018 阅读(187) 评论(0) 推荐(0)
摘要: 1、 [root@centos79 test]# echo $a [root@centos79 test]# a=10 [root@centos79 test]# echo $a 10 [root@centos79 test]# unset a ## 清除变量a [root@centos79 tes 阅读全文
posted @ 2021-07-04 23:10 小鲨鱼2018 阅读(130) 评论(0) 推荐(0)
摘要: linux系统中如何删除行首、行尾的空格 1、删除行首空格、制表符 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r e i x k like a f g liker a g r e a f g liker [r 阅读全文
posted @ 2021-07-04 22:56 小鲨鱼2018 阅读(1485) 评论(0) 推荐(0)
摘要: 1、在所有行后添加空行 [root@centos79 test]# cat a.txt a g r e i x k like a f g liker s t 2 a b d s i [root@centos79 test]# awk '{print $0 "\n"}' a.txt a g r e i 阅读全文
posted @ 2021-07-04 22:47 小鲨鱼2018 阅读(848) 评论(0) 推荐(0)
摘要: 1、测试数据如下 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r e i x k like a f g liker [root@centos79 test]# cat -A a.txt a g r e$ $ $ 阅读全文
posted @ 2021-07-04 20:45 小鲨鱼2018 阅读(917) 评论(0) 推荐(1)
上一页 1 ··· 295 296 297 298 299 300 301 302 303 ··· 408 下一页