mootools php faith camera linux


Remove Mac Encoding

cp $$1.
'r' 'n' < $1. > $1

Firstly, to run this linux shell script, you will need shell access. If you are unsure what a shell is, it is high time you figured it out. Linux is great, but without the shell, it's like...uh, not Linux. Contact your web host and ask them for shell access, of course, if you are having problems with Mac encoding, you are probably past this step ;)

Save this file with the name Then be sure the permissions allow you to execute the file (try chmod 775 ).

For a brief explanation: set the #!/bin/sh to the path to your sh on your linux installation. The other lines use a short series of simple linux commands like copy (cp), translate (tr), and remove (rm) to alter the encoding of the file by way of a temporary file, which is dutifully removed ( rm $i. ).

The way to call this shell script is like this myMacEncodedFile.php

Last Updated: 2009-02-07 08:23:27
Creative Commons License Jay Johnston is a Zend Certified Engineer in PHP 5 LPI-ID: LPI000102450, Verfication Code: wmnnt56y2k  ... Jay Johnston is certified as LPIC-1 by the Linux Professional Institute