On Wed, 2005-08-17 at 09:29 +0200, StarQuake wrote: > I know when redirecting output to a file you can do 2&1> to redirect > stderr to stdout. But how would I redirect when want to pipe? > > For example: > To also let this command mail the error messages: > # /usr/bin/php -q -f /var/www/galvatrack/sync/unispeqs2mysql.php | > /usr/sbin/sendmail jan@xxxxxxxxx > > I had to change it like this > > # /usr/bin/php -q -f /var/www/galvatrack/sync/unispeqs2mysql.php &> > /var/www/galvatrack/sync/lasttime.log; cat > /var/www/galvatrack/sync/lasttime.log | /usr/sbin/sendmail my@xxxxxxxxxxx > > But that just look horrible php -q -f /var/..blah../unispeqs2mysql.php 2>&1 | /usr/sbin/sendmail ... Paul. -- Paul Howarth <paul@xxxxxxxxxxxx>