Unix .TXT vs DOS .TXT files
Steve Litt
slitt at troubleshooters.com
Wed Dec 29 18:05:06 GMT 1999
Subba,
Samba itself doesn't do translation, thank goodness.
Your best solution depends on what you're doing with the translation. For
instance, you might be building a website in-place to be displayed via
http. In that case you'd need to remove the ^M chars and also get the
capitalization of files to match their links. That's best done with a
script that traverses the website tree. The script would have as its heart
something like this:
cat $1 | tr -d "\r" > $1
Obviously, such a script must convert only text files such as .html, .cgi,
etc.
You could conceivably put such a script in a pseudo printer print command
to convert single files on the fly, but that's kind of involved given that
you'll need to define the destination directory.
The other possibility is simultaneous use of text files from both Unix and
Windows. That's an editor issue. Wordpad and many other editors can handle
it. You can download vim from vim.org and use the same editor on both Unix,
DOS and Windows. In VI, you simply do the proper :set fileformat= and then
save.
Hope this helps.
Steve Litt
At 12:56 PM 12/29/1999 +1100, you wrote:
>
>Is there any option that will covert a text file from one system
>to the other? I have a few files on linux with extension TXT. There are
>plain text files. On NT, TXT is associated with the "notepad" and opens
>with the file as one long string. This is the typical CR/LF conversions
>between Unix and DOS.
>
>Can Samba convert the text files based on the client?
>
>Subba Rao
>subb3 at attglobal.net
>http://pws.prserv.net/truemax/
>
> => Time is relative. Here is a new way to look at time. <=
>http://www.smcinnovations.com
>
More information about the samba
mailing list