OFB Community Mailing Lists

The following archives are provided as a public service to the community. Opinions archived here do not necessarily represent the opinions of Open for Business or its contributors.

[CS-FSLUG] shell script trivia

Frank Bax fbax at sympatico.ca
Fri Oct 15 09:59:58 EDT 2004


Sometime ago I wrote an application in php.  Shortly thereafter it was 
decided that some of the reports should be emailed to users on a regular 
basis (a good job from cron).  The server wasn't configured to run php from 
command line, so I used "lynx -source" to get the report out of application 
and "attach" to an email message.  Because I wanted some info from database 
in the subject line, it was easier to modify the php scripts to supply 
everything I needed (mail headers, mime headers) so that I could simply 
pipe the lynx output to sendmail with:
	lynx -source http://domain.com/report.php?id=22 | sendmail -i -t
But the version of php on my recently upgraded server includes a blank line 
at the beginning of file that wasn't there in old version and sendmail is 
now complaining.  I know the problem isn't with lynx because running my 
script from old server to retrieve php report from new server also fails.

Is there an existing command I can use to strip off that first line?

Frank




More information about the Christiansource mailing list
Home About Connect: Twitter Facebook RSS
© 2001-2011 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.