|
#1
| |||
| |||
| Converting text files from windows to unix (OSX) and back If you use BBEdit this isn't a big deal, but I use pico a lot for quick edits of files, and a lot of our developers use Windows to edit the files, so the linebreaks are different, which causes pico (or any Unix editor) to open the file all on one line with no line breaks. A quick, one line way to convert from windows to unix is at the terminal prompt is to type: tr '\n' '\r' < /path/to/winfile > /path/to/macfile I usually create two scripts in my /bin folder called "demac" and "tomac". They actually create a backup copy just in case, and then make the new file the same name as the old. you can copy and past the following into Pico and save them: demac (to convert from mac to windows): #!/bin/sh tr '\r' '\n' < $1 > temp mv $1 $1.bak mv temp $1 tomac (to convert from windows to mac): #!/bin/sh tr '\n' '\r' < $1 > temp mv $1 $1.bak mv temp $1 I then type "demac filename" or "tomac filename" and the original is stored as "filename.bak" just in case |
|
#2
| |||
| |||
| Re: I have a question Quote:
|
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| From Windows FTP to OSX w/SharePoints | tdurham | Mac OS X System & Mac Software | 0 | February 18th, 2003 06:06 PM |
| Using Windows USB keyboard with OSX | neuroman | Mac OS X System & Mac Software | 2 | June 15th, 2002 05:24 AM |
| Re-intsalling OSX changed my IP, can get back my old one?! | ThE OutsiDer | Mac OS X System & Mac Software | 2 | December 10th, 2001 06:06 PM |
| Using Windows USB keyboard in OSX | neuroman | Mac OS X System & Mac Software | 3 | November 30th, 2001 03:56 PM |