
1 jsonline 2014 年 5 月 16 日 你干脆用 python 吧。普通开发者不要学 bash 了 |
2 ivvei 2014 年 5 月 16 日 alias viewcOnfig="egrep -v '(#|^\s*$)' config|less" |
5 WDsUO7HnS2Na1DFC 2014 年 5 月 16 日 #!/bin/bash egrep -v '(#|^\s*$)' $1 | less |
6 superbear 2014 年 5 月 16 日 将变量作为参数传入就可以了,egrep -v xxx file.config | xargs less 试试 |
7 Sunyanzi 2014 年 5 月 6 日 @ioiioi 直接用 alias 为何不行 ..? 以及如果只是想要空格翻页的话 ... 用 more 就好了 ... alias cfg="grep -Ev '(#|^\s*$)' $1|more" |
8 ioiioi OP |
10 ioiioi OP centos 6.5 [root@fzgw sites-enabled]# bash --version GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) |