- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ASCII File output
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
08-21-2000 04:15 PM
08-21-2000 04:15 PM
ASCII File output
How can I take an ASCII file in fixed width format ( fields are separated by spaces or tabs) and convery it to quoted, comma delimited format using HP-UX? Is that possible? Any other solutions?
Thanks in advance for your help,
Sanjay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2000 04:28 PM
08-21-2000 04:28 PM
Re: ASCII File output
Check the man pages for the various options available with 'tr'. You might find 'sed', 'awk' and/or 'cut' useful for parsing the fields/
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2000 02:58 AM
08-22-2000 02:58 AM
Re: ASCII File output
to replace a space with a comma
sed s/
where
To then do the TAB replace space with a physical tab and use newfilename into either another newfile.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2000 03:02 AM
08-22-2000 03:02 AM
Re: ASCII File output
Sorry missed a few critical slashes
this should now work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2000 03:09 AM
08-22-2000 03:09 AM
Re: ASCII File output
Please see the attached
file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2000 03:24 AM
08-22-2000 03:24 AM
Re: ASCII File output
#!/usr/bin/sh
while read REC
do
for FIELD in ${REC}
do
print -n "\"${FIELD}\","
done
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2000 05:05 AM
08-22-2000 05:05 AM
Re: ASCII File output
cat {filename} | tr " " "," > {new file}
Of course if there are spaces in the data then this would only cause problems.
Hope this helps,
Steve