Maybe my memory isn't clear on this point, but even in BBEdit 7 can't
you do search and replace across any number of files? Why not search
for \n and replace with \r to convert Mac line endings to Unix line
endings?
Also, and again maybe I'm missing something, but according to my
understanding of tr, you'd want to use something like:
tr \n \r < file.mac.txt > file.unix.txt
Here's what the man page on tr says:
NAME
tr -- translate characters
SYNOPSIS
tr [-Ccu] string1 string2
DESCRIPTION
The tr utility copies the standard input to the standard
output with sub-
stitution or deletion of selected characters.
[...]
In the first synopsis form, the characters in string1 are
translated into
the characters in string2 where the first character in string1
is trans-
lated into the first character in string2 and so on. If
string1 is
longer than string2, the last character found in string2 is
duplicated
until string1 is exhausted.
--
Greg Raven
Apple Valley, CA
On Apr 20, 2006, at 10:37 PM, Google Kreme wrote:
On 20 Apr 2006, at 19:44 , Rich Siegel wrote:
On 4/20/06 at 9:39 PM, Timothy Driscoll <[EMAIL PROTECTED]> wrote:
sorry. I should have said: I am still working in BBEdit 7.1.3.
Upgrade, then use a text factory? ;-)
Heh.
I think this should be scriptable though, isn't line ending one of
the flags for save?
However, I would thing the best solution would be to use tr from
the command line to replace any Mac EOLs with Unix EOLs:
tr \r \n < file.mac.txt > file.unix.txt
you can also use perl:
perl -pi -e 's/\r/\n/g' <filename>
which is technically a bit slower as I recall, but has the
advantage of replacing in place.
--
...gentlemen in England now a-bed Shall think themselves accursed
they were not here,
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>