Reputation: 449
For converting Windows data file to Unix data file, I'm using dos2unix
command but it's not executing. It's giving me the following message:
$ dos2unix new_request.txt testing.txt
ksh: dos2unix: not found.
Upvotes: 0
Views: 5160
Reputation: 189679
If you don't have dos2unix
on your system, you can approximate it with
tr -d '\015' <dos.txt >unix.txt
The syntax for tr
varies somewhat between systems; check that the output is what you expect, and consult the local tr
man page if not. You want to remove the carriage return characters (ASCII 13, hex 0x0D, ctrl-M, aka \r
) from the file.
Upvotes: 1
Reputation: 2917
You either don't have dos2unix or it is not in your system's path. Do one of the following:
Upvotes: 1