1

Is there a way to remove windows line endings on a basic windows 7 install. I'm working on a windows 7 computer with notepad and word 2010 at work. I'm trying to demo markdown without installing additional text editor, and keeping it installed locally.

I've tried Word with replace on \r\n, special characters and other ways and it can't locate. Notepad same issue.

Or is there a markdown converter that an online markdown converter that will handle windows line endings?

Marc K
  • 113
  • 6

1 Answers1

1

I don't see anything online about how to do it in word, and it can't be done natively by windows 7(though wordpad, unlike notepad, can open-view files with *nix line endings, it can't save them). But there are ea ton of 3rd party programs that do it. I use cygwin and its dos2unix and unix2dos commands.. others use gvim if they're brave(:set fileformat=unix or :set fileformat=dos), or any number of text editors..

ADDED- It looks like the batch file gurus(and a few gods) of dostips forum have something Which tells me that powershell gurus might too
http://www.dostips.com/forum/viewtopic.php?f=3&t=3897&mobile=on

barlop
  • 23,380
  • 43
  • 145
  • 225
  • I know there 3rd party programs. But like I said, I'm trying to avoid installing 3rd party programs so I don't have to run installing a 3rd party program by my MIS dept. – Marc K Jun 08 '14 at 02:24
  • @MarcK well i'd think if there was a way it'd be more well known. One way -in theory- would be to write an EXE in DEBUG(which is in win7 ultimate). that strips out \r thus turning any \r\n to \n. Another whichn is minimalistic in installing anything is to grab the tr.exe from gnuwin32 and use that to strip out \r (td -d '\r'). – barlop Jun 08 '14 at 02:33
  • @MarcK Some News- It looks like the batch file gurus(and a few gods) of dostips forum have something http://www.dostips.com/forum/viewtopic.php?f=3&t=3897&mobile=on Which tells me that powershell gurus might too – barlop Jun 08 '14 at 02:34
  • Thanks, I'll try that at work on Monday and see how that works. – Marc K Jun 08 '14 at 03:43
  • Thanks, that batch file appears to work. Those windows line endings are annoying. – Marc K Jun 11 '14 at 22:20