Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

breaking a file based on the Key column

Status
Not open for further replies.
Oct 22, 2001
215
0
0
US
Hi
What would be the best way to split a file into pieces based on the 1st column (say 8 char, fixed length), some thing like this: The text file file1 looks like this:

ABCD001 asfafggfdggfgfg
ABCD001 hjhjhjh
ABCD001 hghgh
ABCD002 hjhjhj
ABCD002 jhhj

So I want: file2
ABCD001 asfafggfdggfgfg
ABCD001 hjhjhjh
ABCD001 hghgh

and file2:
ABCD002 hjhjhj
ABCD002 jhhj
TIA
 
See your thread822-333226 for 2 solutions CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top