继续

[root@localhost ~]#
[root@localhost ~]# echo "hello" | xg
xgamma xgettext
[root@localhost ~]# echo "hello" | xa
xargs xauth
[root@localhost ~]# echo "hello" | xargs
hello
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# echo "hello yyj" | xargs -n 1
hello
yyj
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# echo "hellp#yyj" | xargs -d "#"
hellp yyj

[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# vim awk.txt
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk '{print $1}' awk.txt
xm
xmm
xh
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cat awk.txt
xm 11 12 13
xmm 1 11 113
xh 22 43 42
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk '{print $2}' awk.txt
11
1
22
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk '{print $3}' awk.txt
12
11
43
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk '{print $NF}' awk.txt
13
113
42
[root@localhost ~]# awk '{print $NF-1}' awk.txt
12
112
41
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk 'NR3{print $3}' awk.txt
43
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk 'NR
3{print $0}' awk.txt
xh 22 43 42
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk 'NR3{print $1}' awk.txt
xh
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# awk 'NR
1,NR==3{print $0}' awk.txt
xm 11 12 13
xmm 1 11 113
xh 22 43 42
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# vim test2.txt
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uni
unicode_start unicode_stop uniq unix_chkpwd unix-lpr.sh unix_update
[root@localhost ~]# uniq test2.txt
hello
Hello
hello world
hi world
how are you
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uniq -c test2.txt
2 hello
1 Hello
1 hello world
1 hi world
1 how are you
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uniq -d tes
uniq: tes: 没有那个文件或目录
[root@localhost ~]# uniq -d test
test2.txt test.txt
[root@localhost ~]# uniq -d test2.txt
hello
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uniq -u test
uniq: test: 没有那个文件或目录
[root@localhost ~]# uniq -u test.txt
2046 2048 2046 2046
1001 2046 2999 1888
2046 2046 2046 2046

[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uniq -u test2.txt
Hello
hello world
hi world
how are you
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# uniq -i test2.txt
hello
hello world
hi world
how are you
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#

posted on 2025-12-18 10:45  爱尔奎特‘殷’  阅读(5)  评论(0)    收藏  举报