awk 切檔問題 - Linux

By Tracy
at 2016-02-24T21:48
at 2016-02-24T21:48
Table of Contents
想請教一下各位
我的檔案內容大致為
http://140.113.134.148/123.txt
裡面大概有2千多個.TIF的內容
想依據個數來切割 分為五等分
希望的輸出內容為
123.TIF xc= 30000 yc=30000
Hole x y
1 234 2354
2 234 2354
但我目前利用awk僅能做到
awk 'BEGIN{RS="TIF"} (NR-1){print $0 > ("output-file_" NR)}' 123.txt
輸出內容為:
xc= 30000 yc=30000
Hole x y
1 234 2354
2 234 2354
不知道要如何改善 再麻煩給點提示了
--
我的檔案內容大致為
http://140.113.134.148/123.txt
裡面大概有2千多個.TIF的內容
想依據個數來切割 分為五等分
希望的輸出內容為
123.TIF xc= 30000 yc=30000
Hole x y
1 234 2354
2 234 2354
但我目前利用awk僅能做到
awk 'BEGIN{RS="TIF"} (NR-1){print $0 > ("output-file_" NR)}' 123.txt
輸出內容為:
xc= 30000 yc=30000
Hole x y
1 234 2354
2 234 2354
不知道要如何改善 再麻煩給點提示了
--
Tags:
Linux
All Comments

By Olive
at 2016-02-28T14:56
at 2016-02-28T14:56

By William
at 2016-03-03T20:31
at 2016-03-03T20:31

By Ida
at 2016-03-07T09:32
at 2016-03-07T09:32

By Adele
at 2016-03-11T12:22
at 2016-03-11T12:22

By Puput
at 2016-03-15T01:09
at 2016-03-15T01:09

By Jacky
at 2016-03-15T14:55
at 2016-03-15T14:55

By Tristan Cohan
at 2016-03-19T19:37
at 2016-03-19T19:37
Related Posts
Manjaro ARM

By Agnes
at 2016-02-24T19:16
at 2016-02-24T19:16
ubuntu 12.04的screen上bbs

By Mia
at 2016-02-24T19:03
at 2016-02-24T19:03
界面的中文遺缺

By Caitlin
at 2016-02-24T15:59
at 2016-02-24T15:59
tw.archive.ubuntu.com 在英國?

By Olivia
at 2016-02-24T14:57
at 2016-02-24T14:57
tw.archive.ubuntu.com 在英國?

By Edward Lewis
at 2016-02-24T14:41
at 2016-02-24T14:41