HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sorting data in a big file
Operating System - HP-UX
1834026
Members
2257
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2001 05:42 AM
03-22-2001 05:42 AM
I create a rather large file every day, that I would like to break down in to numerous little files. The file contains process data. Each line of the file has 101 fields seperated by commas ","; 100 data fields, 1 date time field.
I have another file, with a number of lines, that defines the production batches. Each line in this file consist of the three fields; the batch name, the start date and time for the batch, and the finish date and time for the batch.
I have created a shell script (attached) that attempts to lay the foundation for looping through all of the batches in the second file, and create a seperate file for each batch from the data saved in the first file. However, when I execute this script I always get the following error from sed: "sed: Function /Mar cannot be parsed."
I have not used sed before, so I realize that it may not be the best solution. I am open to other ideas.
I'm working on a HP-UX 10.20, 700 series machine.
I have another file, with a number of lines, that defines the production batches. Each line in this file consist of the three fields; the batch name, the start date and time for the batch, and the finish date and time for the batch.
I have created a shell script (attached) that attempts to lay the foundation for looping through all of the batches in the second file, and create a seperate file for each batch from the data saved in the first file. However, when I execute this script I always get the following error from sed: "sed: Function /Mar cannot be parsed."
I have not used sed before, so I realize that it may not be the best solution. I am open to other ideas.
I'm working on a HP-UX 10.20, 700 series machine.
Sometimes the best answer is another question
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2001 05:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2001 06:10 AM
03-22-2001 06:10 AM
Re: Sorting data in a big file
That fixed the sed error. I get the new file correction working completely I had to change the -e to a -n. When I did that the script created the correct file.
Thank you
Thank you
Sometimes the best answer is another question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2001 07:46 AM
04-11-2001 07:46 AM
Re: Sorting data in a big file
I don't know at what level you are looking for but for a quick and dirty sort I use
"sort filename|uniq -d"
You can pipe it to a file or just the way it is to sort the existing file. Hope it helps...
"sort filename|uniq -d"
You can pipe it to a file or just the way it is to sort the existing file. Hope it helps...
To be first you gotta live last
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP