Program to convert Unix file format to DOS / Windows format.

Program to convert Unix file format to DOS / Windows format.

Post by mike » Sun, 31 Dec 1899 09:00:00



Hi ,
    I just saw a request on this list for a program to convert DOS files

to Unix.
    I would like a program to convert Unix format to DOS

                                                            Thanks
                                                                    Mike

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by mike » Sun, 31 Dec 1899 09:00:00


Hi ,
    I just saw a request on this list for a program to convert DOS files

to Unix.
    I would like a program to convert Unix format to DOS

                                                            Thanks
                                                                    Mike

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by Paul Flo » Sun, 31 Dec 1899 09:00:00



>Hi ,
>    I just saw a request on this list for a program to convert DOS files
>to Unix.
>    I would like a program to convert Unix format to DOS

unix2dos

It's widely available on the net.

Regards
Paul
--
Paul Floyd http://paulf.free.fr

What's the point? The sharp bit on the end.

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by spaml.. » Sun, 31 Dec 1899 09:00:00



> Hi ,
>     I just saw a request on this list for a program to convert DOS files
> to Unix.
>     I would like a program to convert Unix format to DOS

See if you have one installed. Many distributions come with something like
"todos" and "fromdos" and "tofrodos" or "dos2unix" or whatever.

It's easy enough to write a script for it, too...

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by Dave Nas » Sun, 31 Dec 1899 09:00:00



>     I would like a program to convert Unix format to DOS

If you mean text files, and if you have Windows, open the file in
Wordpad/Write.

Alternatively some Unices (eg Solaris) have "dos2unix" or "unix2dos".  My
Mandrake 7.1 doesn't have it installed but that doesn't mean you can't get
it for Linux.

Dave

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by Hagbar » Sun, 31 Dec 1899 09:00:00


try:

tr -d '\015' < FILENAME.DOS > FILENAME.LINUX

where FILENAME.DOS is the DOS text file you want converted & FILENAME.LINUX
is the file you want the output written to.

just trims the DOS carriage returns, but useful to have on hand...

substitute $1 for FILENAME.DOS and $2 for FILENAME.LINUX and make it an
executable file that accepts parameters.

hth,

hagbard


> Hi ,
>     I just saw a request on this list for a program to convert DOS files

> to Unix.
>     I would like a program to convert Unix format to DOS

>                                                             Thanks
>                                                                     Mike

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by Scott Alft » Thu, 16 Nov 2000 11:39:12


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1




>>     I would like a program to convert Unix format to DOS

>If you mean text files, and if you have Windows, open the file in
>Wordpad/Write.

>Alternatively some Unices (eg Solaris) have "dos2unix" or "unix2dos".  My
>Mandrake 7.1 doesn't have it installed but that doesn't mean you can't get
>it for Linux.

I usually use something like this:

awk '{printf("%s\r\n",$0)}' in >out

It works, and awk is available everywhere.  Going the other way is even
simpler:

cat in | tr -d "\r" >out

Who needs separate monolithic programs for every little thing when you can
recombine the existing tools to do what you want?  That's the beauty of UN*X
and systems like it (perl and emacs notwithstanding :-) ).

  _/_
 / v \
(IIGS(  Scott Alfter (remove Voyager's hull number for email address)
 \_^_/  http://salfter.dyndns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6Efg6VgTKos01OwkRAs86AKCfb6qgNNc56qwznw54f5fD/43ajgCg6Jap
SLqfwCaZgx+RRCitdoqDOd4=
=6UJn
-----END PGP SIGNATURE-----

 
 
 

Program to convert Unix file format to DOS / Windows format.

Post by Jeff Howi » Sun, 31 Dec 1899 09:00:00



>     I just saw a request on this list for a program to convert DOS files

> to Unix.
>     I would like a program to convert Unix format to DOS

All that is needed is to add an extra carriage-control to the end of
each line. A short perl line like this will do:

    $ perl -pe 's/$/\r/' -i.org unix.file

Where 'unix.file' is the input file (could be *). This will leave the
original file with a '.org' extension. Just replace the above '-i.org'
with '-i' if you don't want the backups.

thks.jeff

 Sent via Deja.com http://www.deja.com/
 Before you buy.

 
 
 

1. Converting Windows/DOS files to a Unix format.

I have check out files that are compiled using Visual C++ as the main tool.
When you check them out using Visual Source Safe they have a carriage return
and a line feed.  When you port them to Unix they have that aannoying "^M" behind every line.
The question I wanted to ask is there some way to strip them out of the file so I can build.
Thakns very  much.

2. Lsmtool 0.5 -- tools for browsing the LSM and checking entries

3. How to convert text files from Mac/Apple format to Unix format?

4. Hyundai Sparc Classic clone runs 4.1.3/Solaris 1.1

5. Convert vc file format to Lotus 1-2-3 file format?

6. How to make Slakware boot off Harddrive ??? Help

7. dos file convert to unix format

8. Backfinger on Ultrix V4.3 rev 44

9. Unix Script to convert text files to DOS format?

10. collection: converting DOS files to UNIX format

11. Converting VMS backup format to UNIX tar format

12. Converting Java batch file from windows to unix format

13. Howto change files in Dos format to Linux format