Re: Bulk Linebreak Changes

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 41529
interpreted = N
texte = Jesse, found this on MAc OSX hints a few months ago when I needed the same thing .. 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 tyepmkdir bin 2. the in the bin directory create a file called 'fle' with your favorite editor and then put in this oneline:for T in `ls -a $*`; do perl -pi -e 's/rn?/n/g' $T; doneI 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'reusing and open a new one. For some reason when creating new shell scripts this has to be donebefore 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.txtit will work with one or mulitple files.Best part is you can set the permissions and run it from WebCat .. HTH, Alain> Is there an easy way to do a bulk linebreak change from Mac to Unix? I > can't FTP the files. I've found a perl script to do it but it does > files one at a time and I need about 10000 files done... > > -- > > Jesse Williams-Proudman || CEO > NineWire Digital Solutions || +1.888.873.6199 > jesse@ninewire.com || http://ninewire.com > Mac Web Hosting & Colocation || Mac Nationwide Dialup > > $75 Xserve Colocation Special from Your Mac ISP! > > > ------------------------------------------------------------- > 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://search.smithmicro.com/ -- Alain Russell Blackpepper Interactive alain.russell@blackpepper.co.nz ph. 09 520 6280------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Bulk Linebreak Changes (Kenneth Grome 2002)
  2. Re: Bulk Linebreak Changes (Stuart Tremain 2002)
  3. Re: Bulk Linebreak Changes (Gary Krockover 2002)
  4. Re: Bulk Linebreak Changes (Jesse Williams-Proudman 2002)
  5. Re: Bulk Linebreak Changes (Stuart Tremain 2002)
  6. Re: Bulk Linebreak Changes (Jesse Williams-Proudman 2002)
  7. Re: Bulk Linebreak Changes (Britt T. 2002)
  8. Re: Bulk Linebreak Changes (Alain Russell 2002)
  9. Re: Bulk Linebreak Changes (Nitai @ ComputerOil 2002)
  10. Bulk Linebreak Changes (Jesse Williams-Proudman 2002)
Jesse, found this on MAc OSX hints a few months ago when I needed the same thing .. 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 tyepmkdir bin 2. the in the bin directory create a file called 'fle' with your favorite editor and then put in this oneline:for T in `ls -a $*`; do perl -pi -e 's/rn?/n/g' $T; doneI 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'reusing and open a new one. For some reason when creating new shell scripts this has to be donebefore 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.txtit will work with one or mulitple files.Best part is you can set the permissions and run it from WebCat .. HTH, Alain> Is there an easy way to do a bulk linebreak change from Mac to Unix? I > can't FTP the files. I've found a perl script to do it but it does > files one at a time and I need about 10000 files done... > > -- > > Jesse Williams-Proudman || CEO > NineWire Digital Solutions || +1.888.873.6199 > jesse@ninewire.com || http://ninewire.com > Mac Web Hosting & Colocation || Mac Nationwide Dialup > > $75 Xserve Colocation Special from Your Mac ISP! > > > ------------------------------------------------------------- > 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://search.smithmicro.com/ -- Alain Russell Blackpepper Interactive alain.russell@blackpepper.co.nz ph. 09 520 6280------------------------------------------------------------- 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://search.smithmicro.com/ Alain Russell

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:

[date] problem with %d%m%Y (1998) carriage returns in data (1997) Explorer 3.0/ Access Denied! (1997) [OT] JS Libraries (2007) Personal Web Server combined with Webcatalog 2.1 (1998) problems with 2 tags (1997) authorize.net hex coded variables (2002) Webcat2, WebCommerce, Mod 10 etc. (1997) [WebDNA] Does anyone host webdna sites? (2016) Locking up with WebCatalog... (1997) 2 easy questions re: [showif] and [sendmail] (1997) How To question on setting up downloads (1997) Error handling for accountNum (1997) Two submit buttons ? (1997) RE: Webcat 2.0.1b1 bug with IE 3.01/4.0p1 (1997) Error: Can't open order file. (2005) Is this possible in simple search? question? (1998) switching users (1998) Template Security error (1997) WebCatalog for Postcards ? (1997)