zhq@manjaro test1 cat hello.txt |grep -o 's'
s
s
s
s
s
zhq@manjaro test1 cat hello.txt |grep -o 's'|wc -l
5
选项
含义
-R, -r, --recursive
递归地读每一目录下的所有文件。这样做和 -d recurse 选项等价
zhq@manjaro test1 sudogrep -rne 'pacman' /etc/*.conf
/etc/healthd.conf:16:# N.B.: If you choose to use the beep command, you'll need to install it: pacman -S beep
/etc/logrotate.conf:20:# Ignore pacman saved files
/etc/pacman.conf:2:# /etc/pacman.conf
/etc/pacman.conf:4:# See the pacman.conf(5) manpage for option and repository directives
/etc/pacman.conf:13:#DBPath = /var/lib/pacman/
/etc/pacman.conf:14:CacheDir = /var/cache/pacman/pkg/
/etc/pacman.conf:15:#LogFile = /var/log/pacman.log
/etc/pacman.conf:16:#GPGDir = /etc/pacman.d/gnupg/
/etc/pacman.conf:17:#HookDir = /etc/pacman.d/hooks/
/etc/pacman.conf:18:HoldPkg = pacman glibc manjaro-system
/etc/pacman.conf:42:# By default, pacman accepts packages signed by keys that its local keyring
/etc/pacman.conf:43:# trusts (see pacman-key and its man page), as well as unsigned packages.
/etc/pacman.conf:48:# NOTE: You must run `pacman-key --init` before first using pacman; the local
/etc/pacman.conf:50:# packagers with `pacman-key --populate archlinux manjaro`.
/etc/pacman.conf:55:# - pacman will search repositories in the order defined here
/etc/pacman.conf:77:Include = /etc/pacman.d/mirrorlist
/etc/pacman.conf:81:Include = /etc/pacman.d/mirrorlist
/etc/pacman.conf:85:Include = /etc/pacman.d/mirrorlist
/etc/pacman.conf:92:Include = /etc/pacman.d/mirrorlist
/etc/pacman.conf:94:# An example of a custom package repository. See the pacman manpage for
/etc/pacman-mirrors.conf:2:## /etc/pacman-mirrors.conf
zhq@manjaro test1 cat hello.txt
hello world
Generally speaking, long holidays are
good for us college students. On the one hand, we
have a lot of time to study by ourselves and thus
improve weaknesses and further develop
strengths. On the o
ther hand, we can take part-time jobs, which can make us realize responsibility
and make ourselves better prepared for social life.
But every coin has two sides. Some students fail to make good use
of their time and they
are addicted to various computer games. I am afraid that they are likely to
ruin themselves in this way
16:25:52 zhq@manjaro test1 cat hello.txt|grep -w long
Generally speaking, long holidays are
18:03:56 zhq@manjaro test1 cat hello.txt |grep -oE '\<[a-z]*o\>'
hello
to
o
two
to
to
to
18:03:47 zhq@manjaro test1 cat hello.txt |grep -oE '\<[a-z]*o\>'|wc -l
7
18:04:01 zhq@manjaro test1 cat hello.txt |grep -oE '\<[a-z]*o\>'
hello world
Generally speaking, long holidays are
good for us college students. On the one hand, we
have a lot of time to study by ourselves and thus
improve weaknesses and further develop
strengths. On the o
ther hand, we can take part-time jobs, which can make us realize responsibility
and make ourselves better prepared for social life.
But every coin has two sides. Some students fail to make good use
of their time and they
are addicted to various computer games. I am afraid that they are likely to
ruin themselves in this way
hq@manjaro test1 grep -Ev '^#|^$' hello.txt 130 ↵
hello world
good for us college students. On the one hand, we
improve weaknesses and further develop
strengths. On the o
cd3
cdd3
ther hand, we can take part-time jobs, which can make us realize responsibility
and make ourselves better prepared for social life.
But every coin has two sides. Some students fail to make good use
of their time and they
are addicted to various computer games. I am afraid that they are likely to
ruin themselves in this way
88888
$$$$$