Re: Line Endings

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 53270
interpreted = N
texte = http://www.macosxhints.com/article.php?story=20001206164827794 This link explains how to do this using perl. Make sure to look at the multiple files comments. For the archives in case the page above goes away: I found that I needed to do like 100 at a time and it wasn't going to cut it to pass one file at a time. This is what I did: 1. if you don't have a bin directory in your home directory make one go to the terminal and tyep "mkdir bin" 2. the in the bin directory create a file called 'fle' with your favorite editor and then put in this one line: for T in `ls -a $*`; do perl -pi -e 's/rn?/n/g' $T; done I chose "T" for no particular reason. 3. Save he file and in the terminal type: chmod 755 fle while in the bin directory. 4. If you want to use it right away, you need to first close whatever terminal window you're using and open a new one. For some reason when creating new shell scripts this has to be done before you can execute them. That's it. Now when you want to do a whole directory you can do: fle * (or simply fle by itself) or specify file-names: fle *.php or fle myfile.txt it will work with one or mulitple files. So, if you install this script, I'm thinking fle *.tpl will work. You might also consider BBEdit (and/or Applescript if you need to get fancy)? BBEdit can do multi-file search and replace pretty easily. Add in some Applescript and you're able to do almost anything. Bill on 10/3/03 4:40 PM, Clint Davis at cdavis@grayloon.com wrote: > Since I just moved from MacOS 9 to MacOS X, all my sendmail contexts are > BROKEN! The incorrect line endings are causing everything to run together. > > I have about 50 websites, and I don't know where I've hidden all the > sendmail stuff. Is there a way I can change the line endings on ALL my tpl > files via the command line? > > --------------------------------------------------------------------- > Clint Davis > Webmaster / Interactive Media Specialist > Gray Loon Marketing Group, Inc. http://www.grayloon.com > 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 > --------------------------------------------------------------------- > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Line Endings ( "Will Starck" 2007)
  2. Re: Line Endings ( Phil Herring 2007)
  3. Re: Line Endings ( Christer Olsson 2007)
  4. Line Endings ( Clint Davis 2007)
  5. Re: Unix line endings ( Rob Marquardt 2003)
  6. Re: Unix line endings ( Clint Davis 2003)
  7. Re: Unix line endings ( Gary Krockover 2003)
  8. Re: Unix line endings ( Jesse Proudman 2003)
  9. Re: Unix line endings ( Gary Krockover 2003)
  10. Re: Unix line endings ( Jesse Proudman 2003)
  11. Re: Unix line endings ( Gary Krockover 2003)
  12. Re: Unix line endings ( Donovan Brooke 2003)
  13. Re: Unix line endings ( Gary Krockover 2003)
  14. Re: Unix line endings ( Donovan Brooke 2003)
  15. Unix line endings ( Gary Krockover 2003)
  16. Re: OS X Line Endings HELL! ( Clint Davis 2003)
  17. Re: OS X Line Endings HELL! ( Donovan Brooke 2003)
  18. Re: OS X Line Endings HELL! ( CN Stuff 2003)
  19. Re: OS X Line Endings HELL [solved] ( Clint Davis 2003)
  20. OS X Line Endings HELL! ( Clint Davis 2003)
  21. Re: Line Endings ( William DeVaul 2003)
  22. Re: Line Endings ( Donovan Brooke 2003)
  23. Re: Line Endings ( Donovan Brooke 2003)
  24. Re: Line Endings ( Tim Robinson 2003)
  25. Line Endings ( Clint Davis 2003)
  26. Re: line endings for Mac OS X files? ( Christer Olsson 2003)
  27. Re: line endings for Mac OS X files? ( "Dana E. Keil" 2003)
  28. Re: line endings for Mac OS X files? ( Donovan 2003)
  29. Re: line endings for Mac OS X files? ( Daniel Schutzsmith 2003)
  30. Re: line endings for Mac OS X files? ( marc@kaiwi.com (Marc Kaiwi) 2003)
  31. line endings for Mac OS X files? ( "Dana E. Keil" 2003)
  32. Re: Parsing overhead for commenting out line endings (Scott Anderson 2003)
  33. Re: Parsing overhead for commenting out line endings (Brian Fries 2003)
  34. Re: Parsing overhead for commenting out line endings (Scott Anderson 2003)
  35. Parsing overhead for commenting out line endings (Rob Marquardt 2003)
  36. Re: Mac vs. Unix Line Endings (Kenneth Grome 2002)
  37. Mac vs. Unix Line Endings (Clint Davis 2002)
  38. Re: DB Line endings (Aaron Lynch 2002)
  39. Re: DB Line endings (Alain Russell 2002)
  40. DB Line endings (Aaron Lynch 2002)
http://www.macosxhints.com/article.php?story=20001206164827794 This link explains how to do this using perl. Make sure to look at the multiple files comments. For the archives in case the page above goes away: I found that I needed to do like 100 at a time and it wasn't going to cut it to pass one file at a time. This is what I did: 1. if you don't have a bin directory in your home directory make one go to the terminal and tyep "mkdir bin" 2. the in the bin directory create a file called 'fle' with your favorite editor and then put in this one line: for T in `ls -a $*`; do perl -pi -e 's/rn?/n/g' $T; done I chose "T" for no particular reason. 3. Save he file and in the terminal type: chmod 755 fle while in the bin directory. 4. If you want to use it right away, you need to first close whatever terminal window you're using and open a new one. For some reason when creating new shell scripts this has to be done before you can execute them. That's it. Now when you want to do a whole directory you can do: fle * (or simply fle by itself) or specify file-names: fle *.php or fle myfile.txt it will work with one or mulitple files. So, if you install this script, I'm thinking fle *.tpl will work. You might also consider BBEdit (and/or Applescript if you need to get fancy)? BBEdit can do multi-file search and replace pretty easily. Add in some Applescript and you're able to do almost anything. Bill on 10/3/03 4:40 PM, Clint Davis at cdavis@grayloon.com wrote: > Since I just moved from MacOS 9 to MacOS X, all my sendmail contexts are > BROKEN! The incorrect line endings are causing everything to run together. > > I have about 50 websites, and I don't know where I've hidden all the > sendmail stuff. Is there a way I can change the line endings on ALL my tpl > files via the command line? > > --------------------------------------------------------------------- > Clint Davis > Webmaster / Interactive Media Specialist > Gray Loon Marketing Group, Inc. http://www.grayloon.com > 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 > --------------------------------------------------------------------- > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ William DeVaul

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Search in 2 or more catalogs (1997) Unable to view next 101-200 (1997) "top" Clarification ( for apache ) (2008) Errata: WCS Newbie question (1997) [shownext] and descending order (1997) Rumpus/Typhoon modules included in Typhoon ... (1997) Format all of a sudden doesn't work (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) WebStar, SSI, and Webcat 2.1.3 (1999) [SHOWIF AND/OR] (1997) GMT question (2004) Not really WebCat (1997) Hiding HTML and breaking the page (1997) Press Release hit the NewsWire!!! (1997) RE: protect tag on NT (1997) [date] formatting bug inside [orderfile]? (1998) Popup Menu Options (1998) WebCat2b13 Command Reference Doc error (1997) [WebDNA] Serial numbers and pricing for WebDNA 7.0 (2011) Error Log.db --however (1997)