- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dos2ux command tool
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
06-08-2004 01:58 PM
06-08-2004 01:58 PM
dos2ux command tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 02:11 PM
06-08-2004 02:11 PM
Re: dos2ux command tool
mv wfile ufile
use dos2ux
dos2ux < wfile > ufile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 02:14 PM
06-08-2004 02:14 PM
Re: dos2ux command tool
i believe u have come to a dead end if u want to remove ^M automatically using dos2ux via copying the file from the share path:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=30923
i too get this problem. with ftp, i have to indicate ascii transfer mode so as not to get ^M in my files. if u choose auto transfer mode, ^M will still appear.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 03:40 PM
06-08-2004 03:40 PM
Re: dos2ux command tool
As Joseph has mentioned, you will have to use the bin command before you start the process of copying files from Windows to HP-UX.
Also, refer to the foll. link:
http://www.karkomaonline.com/article.php?story=20031115012117477
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 05:43 PM
06-08-2004 05:43 PM
Re: dos2ux command tool
Just my 2 cts.
On FTP transfer of ASCII files you have to tell the ftp, that you want to transfer an ASCII file.
Looks like this :
ftp> ascii
200 Type set to A. ( should be the reply )
for binary files ( executables / zipped files etc ) use this :
ftp> bin
200 Type set to I. ( should be the reply )
On ASCII transfer from Windows to Unix the ^M ( CR / LF ) will be scratched on the unix file.
This will also add the ^M on a transfer from Unix to Windows.
by the way :
ftp> ? (shows all available ftp-commands )
Hope i could help.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2004 06:14 PM
06-08-2004 06:14 PM
Re: dos2ux command tool
awk '/\r$/ { rec++}
END {if (NR-1 == rec) { print "DOS FILE" }}'
This way you know which files need to be put through dos2ux and which not.
So in your case, if you put the awk command in a script called chkdos, you can convert all DOS ascii file using this shell command:
find . -type f -print | while read fname
do
if [ "$(chkdos <$fname)" -eq "DOS FILE" ]
then
dos2ux <$fname >/tmp/tmpf
cp /tmp/tmpf $fname
fi
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2004 06:08 PM
06-09-2004 06:08 PM
Re: dos2ux command tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2004 01:02 PM
07-11-2004 01:02 PM
Re: dos2ux command tool
- put the file(s) (and directory(ies)) you want to move from the Windows
machine into a .zip file, say dosfiles.zip
- ftp dosfiles.zip file to the unix machine using binary mode
- on the unix machine use info-zip's unzip [1] command with the -a option to
extract dosfiles.zip's contents. unzip's man page says:
"The -a option causes files identified by zip as text files (those with the `t'
label in zipinfo listings, rather than `b') to be automatically extracted
as such, converting line endings, end-of-file characters and the character
set itself as necessary."
[1] http://www.info-zip.org/UnZip.htm