1

谁能解释下面的行为差异?

ksh 93t + coreutils-6.12:

> cat test.txt
1
2
3
4
5
6
7
8
9
10
> abc=1
> head -`expr $abc + 3` test.txt
1
2
3
4
> cat test.txt | head -`expr $abc + 3`
1
2
3
4

ksh 93u + coreutils 8.12:

> cat test.txt
1
2
3
4
5
6
7
8
9
10
> abc=1
> head -`expr $abc + 3` test.txt
1
2
3
4
> cat test.txt | head -`expr $abc + 3`    1
2
3
4
5
6
7
8
9
10
4

0 回答 0