Hi
After success in accessing UNIX homedir from windows ( thanks to all that respond ) I am facing a problem with ascii file conversion
An ascii file created under UNIX cannot be viewded correctly under windows ( CR LF conversion ) is there an option with Ontap to convert ascii files when opening them under windows and vice-versa ?
Thanks a lot.
Hi
After success in accessing UNIX homedir from windows ( thanks to all that respond ) I am facing a problem with ascii file conversion
An ascii file created under UNIX cannot be viewded correctly under windows ( CR LF conversion ) is there an option with Ontap to convert ascii files when opening them under windows and vice-versa ?
Thanks a lot.
The filer does not do any data conversion that I am aware of.
In our experience we have found that folks who use both Windows and Unix do not often manipulate the same file on both systems. Usually Windows files are only manipulated from Windows and Unix files only from Unix.
However, we do recommend installing NoteTab Light on Windows and using that instead of standard Windows NotePad. NoteTab accepts all three text file line terminators: LF (unix) CRLF (dos) CR (Apple) and will generate output using any of these. So you can keep a file in its original format or convert it.
On the Unix side, Solaris has the "flip" command that converts a text file from LF to CRLF and vice versa. This utility may be available on other flavors of Unix, too.
If you don't have flip, here is a trivial awk command to convert unix to dos by adding CR to each line:
awk '{print $0 "\r"}' unixfile > dosfile
Here is a trivial sed command to convert dos to unix by stripping the CR at the end of the line.
sed 's/.$//' dosfile > unixfile
On Linux, vi (vim) detects the line terminator style and preserves it. And you can also force dos line terminators with the vi command
:set fileformat=dos or :set ff=dos
To force unix use
:set fileformat=unix or :set ff=unix
Steve Losen scl@virginia.edu phone: 434-924-0640
University of Virginia ITC Unix Support
Steve Losen scl@sasha.acc.virginia.edu writes:
However, we do recommend installing NoteTab Light on Windows and using that instead of standard Windows NotePad. NoteTab accepts all three text file line terminators: LF (unix) CRLF (dos) CR (Apple) and will generate output using any of these.
The same applies to recent versions of Emacs, which is available on all three platforms. By default, it autodetects the line break convention used in a file and preserves it through editing and saving.
The filer does not do any data conversion that I am aware of.
The filter doesn't even do any data conversion you're *not* aware of. Bytes is bytes. :-)
In our experience we have found that folks who use both Windows and Unix do not often manipulate the same file on both systems. Usually Windows files are only manipulated from Windows and Unix files only from Unix.
Actually, I unzip ZIP files on UNIX because I can use the unzip command, rather than using nagware for Windows - even if the ZIP file is stuff I'll be using on Windows.
On the Unix side, Solaris has the "flip" command
Where?
hostname$ uname -sr SunOS 5.8 hostname$ man flip No manual entry for flip. hostname$ flip ksh: flip: not found
It does, as others have noted, have dos2unix and unix2dos (which also convert between the DOS extended character set and the "ISO standard characters", probably meaning characters for various ISO 8859/x character sets); are you sure "flip" isn't a third-party program, or a third-party wrapper around "dos2unix" and "unix2dos"?