Solaris Unix text to MS-DOS compatible text?

BarkingGhostar

Diamond Member
Nov 20, 2009
8,410
1,617
136
OK, what is the easiest way to do this? I would prefer to d/l the file into a Windows environment and convert there, but I am open to suggestions. Right now I d/l the text file and open and save in MS Word as MS-DOS compatible text. Just wondered if there was a Windows 7 system CLI or Unix to do this command line.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
Powershell

Code:
(Get-Content "C:\path\to\input.txt") | Set-Content "C:\path\to\output.txt"

"Bash"/Unix

Code:
sed -i "s/$/`echo -e \\\r`/" file

They both term unix line endings into windows ones. That will do it for ya.
 
  • Like
Reactions: Bardock