1,取指定行的指定列
[[email protected] oldboy]# cat aa.txt
1 a
2 b
3 c
4 d
5 e
6 f
7 g
8 h
9 i
10 j
11 k
12 l
13 m
14 n
[[email protected] oldboy]# awk ‘{if(NR>=5 && NR<=10) print $1}‘ aa.txt#me:NR代表行号,&&代表并且
5
6
7
8
9
10
[[email protected] oldboy]# awk ‘{if(NR>=5 && NR<=10) print $2}‘ aa.txt
e
f
g
h
i
j
时间: 2024-12-24 20:33:29