- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ux2dos create a sign(^Z) at the end of the text fi...
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
10-19-2010 09:36 PM
10-19-2010 09:36 PM
ux2dos create a sign(^Z) at the end of the text file
command :ux2dos unixfile.cfg > dosfile.cfg
- Tags:
- ux2dos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2010 10:01 PM
10-19-2010 10:01 PM
Re: ux2dos create a sign(^Z) at the end of the text file
OPen the file in VI and do replace :%s/^Z//g
esc :%s/Type CntrlV Z//g
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2010 10:10 PM
10-19-2010 10:10 PM
Re: ux2dos create a sign(^Z) at the end of the text file
thank you so much ,but i want to know whether have another way to prevent this sign when i execute the command ,Coz i have a lot of files need to convert ,so i can not use vi edit it one bye one .i make a perl script to do this . any other idea ?
thanks
Harvey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2010 10:42 PM
10-19-2010 10:42 PM
Re: ux2dos create a sign(^Z) at the end of the text file
ux2dos myfile|tr -d "\032" >resultfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2010 11:26 PM
10-19-2010 11:26 PM
Re: ux2dos create a sign(^Z) at the end of the text file
thanks all of you ...
but i am a tiro ,no points assign to you now. i won't forgot it when i earned .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 04:09 AM
10-20-2010 04:09 AM
Re: ux2dos create a sign(^Z) at the end of the text file
http://en.wikipedia.org/wiki/Control-Z
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 04:35 AM
10-20-2010 04:35 AM
Re: ux2dos create a sign(^Z) at the end of the text file
Instead if using 'ux2dos' and dealing with the ^Z you could do:
# perl -pe 's{\n}{\r\n}' file
If you wish to perform an in-place update, do:
# perl -pi.old -e 's{\n}{\r\n}' file
This will create a backup of the original file as 'file.old' and perform the substitution you want.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 08:06 AM
10-20-2010 08:06 AM
Re: ux2dos create a sign(^Z) at the end of the text file
Or, ...
Couldn't "sed" handle this job?
I've seen people use Zip ("-l") and UnZip to
do this. (Probably not optimal, but if the
programs are handy ...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 08:34 AM
10-20-2010 08:34 AM
Re: ux2dos create a sign(^Z) at the end of the text file
> Steven: Couldn't "sed" handle this job?
Of course it could. I never said that Perl was the only option, only that it "could". TMTOWTDI.
If you prefer 'sed' the GNU version offers in-place replacement akin to Perl's '-i' switch. With the standard HP-UX 'sed' you must work through your own temporary file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2010 05:27 PM
10-20-2010 05:27 PM
Re: ux2dos create a sign(^Z) at the end of the text file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2010 06:11 AM
10-22-2010 06:11 AM
Re: ux2dos create a sign(^Z) at the end of the text file
Your "thanks" is certainly appreciated. However, please read this about assigning points:
http://forums11.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...