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
Discussions
Discussions
Forums
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
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
тАО02-06-2019 03:09 PM
тАО02-06-2019 03:09 PM
Is there any way to stop ux2Dos from putting an end-of-file character (0x1a) at the end of each converted file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2019 04:33 PM
тАО02-06-2019 04:33 PM
Solution> Is there any way to stop ux2Dos from putting an end-of-file character
> (0x1a) at the end of each converted file?
I doubt it.
Write a short C program to replace "ux2dos"? Delete the thing after
"ux2dos" adds it? For example:
dyi# uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi# cat two.txt
A
B
dyi# cat two.txt | od -b
0000000 101 012 102 012
0000004
dyi# cat two.txt | ux2dos | od -b
0000000 101 015 012 102 015 012 032
0000007
dyi# cat two.txt | ux2dos | tr -d '\032' | od -b
0000000 101 015 012 102 015 012
0000006
What's the flow that requires this sort of line-ending conversion?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2019 07:15 AM
тАО02-07-2019 07:15 AM
Re: ux2Dos
We are writting an extract to send to a customer. Our convention is to write unix style line endings. Our customer wants DOS style line endings. My boss has made the decision that we will not modify our code to generate DOS style line endings for this extract.
I was hoping to not have to write something to remove the end of file character.
Thank you for your assistance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2019 07:43 AM - edited тАО02-07-2019 07:45 AM
тАО02-07-2019 07:43 AM - edited тАО02-07-2019 07:45 AM
Re: ux2Dos
> We are writting an extract to send to a customer. [...]
"send" how, exactly?
> I was hoping to not have to write something to remove the end of file
> character.
The reason I asked about the flow is that one possibility would be
to send a zip archive to the victim instead of a raw text file. For
example, Info-ZIP Zip has an option, "-l convert LF to CR LF", and
Info-ZIP UnZip has an option, "-a auto-convert any text files".
Info-ZIP UnZip or some other unzip programs (or related OS features)
might do the desired line-ending conversion with little or no extra
effort, even if Zip didn't. (And you'd get the compression and
file-integrity checking which come with a zip archive.)
As usual, many things are possible. You probably know more about
your victim's environment and requirements/desires than I do, but
"ux2dos", with or without extra help, might not be the best tool for the
job (depending on exactly what the job actually is).