Re: [OT?] Executing Git from bash script invoked by cron
- From
- Johannes Schneider <mailings@cedarsoft.com>
- Date
- Jul 3, 2010, 17:19 UTC
- Message-ID
- <4C2F7137.6020209@cedarsoft.com>
- In-Reply-To
- <1277759597-sup-9397@nixos>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/28/2010 11:17 PM, Marc Weber wrote:
> sh -c 'your quoted command &> /tmp/logfile' > > b) if this still does not work use strace:
That is it. Thanks. Of course, git writes to stderr. And I did not redirect it properly. I don't understand the details, but this line is working now:
sh -c 'myscript' >> logfile 2> err
The problem - by the way - is related to ssh authentification... But that is another issue...
But here comes my question: Obviously all output created by git push is written to stderr. I'd expected that most of the content will end up in stdout. But I am sure there is a good reason for it - so I just accept it ;-)
Thanks,
Johannes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJML3E0AAoJEAytD9R7Qv6dZ5cIANpYYu5isncB3LcLaQgURQmP esxkrtAVrcghItv+KkSts+qb8IBlEmA1mkzMYpmgVn6M/CQxh3atlaDsTbNtznAA eZVJwXqQwoPlJS8ZvoDcSdldcL5Nmi+nyJgg408y5j3GB4AEt8IihxYVW7Xs0pFQ GdBOSjV/TK1PEjcP7dNYJ9MSdUFA6Z7GrywRKQwlRZ4C611wCBpEoAeD0S1vcJcl B78DTIqB+P3VF+mLW3u2LRXUdp3+tM2uutGR7DkG6GVomHJkwb5zAGXU4AmwHt2L OdDwPAAZ5OzAgfyqLZ4YrOMv9Pg8sOjj+YLfljLUIXB/muJPACqNljv+liCmrac= =X2Lj -----END PGP SIGNATURE-----