Greetings!


I'm writing a script that will take the contents of a text file that has several lines of user accounts and creates a shell script with chown commands for each user in that text file. My problem is that when it writes the shell script file it puts a line break after the colon in between $buffer and html. How do I prevent this from doing that?

Thanks,
Rod

Code:
-----------------------------------------------------------------------

$fhandle = fopen ("/scripts/thescript.sh" , "a");
$handle = fopen ("/scripts/mail_list.txt", "r");
while (!feof ($handle)) {
$buffer = fgets($handle, 1000);
fwrite ($fhandle, "chown $buffer:html /scripts/var/spool/mail/$buffer\n", 4096);
}
fclose ($handle);
fclose ($fhandle);


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to