当前位置: 技术问答>linux和unix
关于unix文件操作的问题!
来源: 互联网 发布时间:2015-10-31
本文导语: 我经过ISQL生成如下文件: saphm mjlxhm pqdjhm lshm year fyje -------------------- ------ -------------- -------- ---- --------------- 0-1-2-3-4-5 01 BJD...
我经过ISQL生成如下文件:
saphm mjlxhm pqdjhm lshm year fyje
-------------------- ------ -------------- -------- ---- ---------------
0-1-2-3-4-5 01 BJDP0511140002 1 1 7110.00
0-1-2-3-4-5 01 BJDP0511140002 2 1 0.00
0-1-2-3-4-5 01 BJDP0511140002 3 1 0.00
0-1-2-3-4-5 01 BJDP0511170031 1 1 1080.00
0-1-2-3-4-5 01 BJDP0511170031 2 1 189.00
0-1-2-3-4-5 01 BJDP0511170031 3 1 1818.00
0-1-2-3-4-5 01 BJDP0511170031 4 1 3240.00
0-1-2-3-4-5 01 BJDP0511220003 1 1 63.00
0-1-2-3-4-5 01 BJDP0511220003 2 1 0.00
0-1-2-3-4-5 01 BJDP0511220003 3 1 0.00
(10 rows affected)
我想把结果变成下面的样式:
0-1-2-3-4-5 01 BJDP0511140002 1 1 7110.00
0-1-2-3-4-5 01 BJDP0511140002 2 1 0.00
0-1-2-3-4-5 01 BJDP0511140002 3 1 0.00
0-1-2-3-4-5 01 BJDP0511170031 1 1 1080.00
0-1-2-3-4-5 01 BJDP0511170031 2 1 189.00
0-1-2-3-4-5 01 BJDP0511170031 3 1 1818.00
0-1-2-3-4-5 01 BJDP0511170031 4 1 3240.00
0-1-2-3-4-5 01 BJDP0511220003 1 1 63.00
0-1-2-3-4-5 01 BJDP0511220003 2 1 0.00
0-1-2-3-4-5 01 BJDP0511220003 3 1 0.00
大家帮帮忙,该怎样实现!谢谢!
saphm mjlxhm pqdjhm lshm year fyje
-------------------- ------ -------------- -------- ---- ---------------
0-1-2-3-4-5 01 BJDP0511140002 1 1 7110.00
0-1-2-3-4-5 01 BJDP0511140002 2 1 0.00
0-1-2-3-4-5 01 BJDP0511140002 3 1 0.00
0-1-2-3-4-5 01 BJDP0511170031 1 1 1080.00
0-1-2-3-4-5 01 BJDP0511170031 2 1 189.00
0-1-2-3-4-5 01 BJDP0511170031 3 1 1818.00
0-1-2-3-4-5 01 BJDP0511170031 4 1 3240.00
0-1-2-3-4-5 01 BJDP0511220003 1 1 63.00
0-1-2-3-4-5 01 BJDP0511220003 2 1 0.00
0-1-2-3-4-5 01 BJDP0511220003 3 1 0.00
(10 rows affected)
我想把结果变成下面的样式:
0-1-2-3-4-5 01 BJDP0511140002 1 1 7110.00
0-1-2-3-4-5 01 BJDP0511140002 2 1 0.00
0-1-2-3-4-5 01 BJDP0511140002 3 1 0.00
0-1-2-3-4-5 01 BJDP0511170031 1 1 1080.00
0-1-2-3-4-5 01 BJDP0511170031 2 1 189.00
0-1-2-3-4-5 01 BJDP0511170031 3 1 1818.00
0-1-2-3-4-5 01 BJDP0511170031 4 1 3240.00
0-1-2-3-4-5 01 BJDP0511220003 1 1 63.00
0-1-2-3-4-5 01 BJDP0511220003 2 1 0.00
0-1-2-3-4-5 01 BJDP0511220003 3 1 0.00
大家帮帮忙,该怎样实现!谢谢!
|
sed '1,2d' inputfile > outputfile