- 论坛徽章:
- 1
|
[monitor@test ~]$ sed '2p' ./tmp.sed
The honeysuckle band played all night long for only $90.
It was an evening of splendid music and company.
It was an evening of splendid music and company.
Too bad the disco floor fell through at 23:10.
The local nurse Miss P.Neave was in attendance.
[monitor@test ~]$ sed -n '2p' ./tmp.sed
It was an evening of splendid music and company.
[monitor@test ~]$ sed -n '/It/p' ./tmp.sed
It was an evening of splendid music and company.
[monitor@test ~]$ sed -n '/It/,2p' ./tmp.sed
It was an evening of splendid music and company.
[monitor@test ~]$ sed -n '/It/,2'p ./tmp.sed
It was an evening of splendid music and company.
[monitor@test ~]$ sed -n '/It/,3p' ./tmp.sed
It was an evening of splendid music and company.
Too bad the disco floor fell through at 23:10.
[monitor@test ~]$ sed -n '/an/p' ./tmp.sed
The honeysuckle band played all night long for only $90.
It was an evening of splendid music and company.
The local nurse Miss P.Neave was in attendance.
[monitor@test ~]$ sed -n '/an/2p' ./tmp.sed
sed: -e expression #1, char 5: unknown command: `2'
[monitor@test ~]$ sed -n '/an/,2p' ./tmp.sed
The honeysuckle band played all night long for only $90.
It was an evening of splendid music and company.
The local nurse Miss P.Neave was in attendance.
应该很清楚了,那就是个label |
|