1dos2unix(1)                                                        dos2unix(1)
2
3
4

NAME

6       dos2unix - DOS/MAC to UNIX text file format converter
7
8

SYNOPSYS

10       dos2unix [options] [-c convmode] [-o file ...] [-n infile outfile ...]
11
12       Options:
13
14       [-hkqV] [--help] [--keepdate] [--quiet] [--version]
15
16

DESCRIPTION

18       This  manual  page  documents dos2unix, the program that converts plain
19       text files in DOS/MAC format to UNIX format.
20
21

OPTIONS

23       The following options are available:
24
25       -h --help
26              Print online help.
27
28
29       -k --keepdate
30              Keep the date stamp of output file same as input file.
31
32
33       -q --quiet
34              Quiet mode. Suppress all warning and messages.
35
36
37       -V --version
38              Prints version information.
39
40
41       -c --convmode convmode
42              Sets conversion mode. Where convmode is  one  of:  ASCII,  7bit,
43              ISO, Mac with ASCII being the default.  Simulates dos2unix under
44              SunOS.
45
46
47
48
49       -o --oldfile file ...
50              Old file mode. Convert the file and write output to it. The pro‐
51              gram default to run in this mode. Wildcard names may be used.
52
53
54       -n --newfile infile outfile ...
55              New  file  mode. Convert the infile and write output to outfile.
56              File names must be given in pairs and wildcard names should  NOT
57              be used or you WILL lose your files.
58
59

EXAMPLES

61       Get input from stdin and write output to stdout.
62
63              dos2unix
64
65
66       Convert and replace a.txt. Convert and replace b.txt.
67
68              dos2unix a.txt b.txt
69
70              dos2unix -o a.txt b.txt
71
72
73       Convert and replace a.txt in ASCII conversion mode.
74
75              dos2unix a.txt -c iso b.txt
76
77
78       Convert and replace b.txt in ISO conversion mode.
79
80              dos2unix -c ascii a.txt -c iso b.txt
81
82
83       Convert c.txt from Mac to Unix ascii format.
84
85
86              dos2unix -c mac c.txt b.txt
87
88
89       Convert and replace a.txt while keeping original date stamp.
90
91              dos2unix -k a.txt
92
93              dos2unix -k -o a.txt
94
95
96       Convert a.txt and write to e.txt.
97
98              dos2unix -n a.txt e.txt
99
100
101       Convert  a.txt  and  write  to  e.txt, keep date stamp of e.txt same as
102       a.txt.
103
104              dos2unix -k -n a.txt e.txt
105
106
107       Convert and replace a.txt. Convert b.txt and write to e.txt.
108
109              dos2unix a.txt -n b.txt e.txt
110
111              dos2unix -o a.txt -n b.txt e.txt
112
113
114       Convert c.txt and write to e.txt. Convert and replace  a.txt.   Convert
115       and replace b.txt. Convert d.txt and write to f.txt.
116
117              dos2unix -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
118
119

DIAGNOSTICS

BUGS

122       The  program  does  not  work  properly under MSDOS in stdio processing
123       mode.  If you know why is that so, please tell me.
124
125

AUTHORS

127       Benjamin Lin - <blin@socs.uts.edu.au>
128
129
130       Bernd Johannes Wuebben (mac2unix mode) <wuebben@kde.org>
131
132
133

MISCELLANY

135       Tested environment:
136
137              Linux 1.2.0 with GNU C 2.5.8
138
139              SunOS 4.1.3 with GNU C 2.6.3
140
141              MS-DOS 6.20 with Borland C++ 4.02
142
143       Suggestions and bug reports are welcome.
144
145

SEE ALSO

147       unix2dos(1) mac2unix(1)
148
149
150
151
1521995.03.31                       dos2unix v3.0                     dos2unix(1)
Impressum