Thanks Tmexa - in our actual application we do some post processing on the merged output in in the script so we need to merge within the command rather than afterwards.
We got to the bottom of this though - we hadn't realised that the default shell for qsub was csh, which doesn't understand the 2>&1 notation. If we specify -S /bin/bash when we submit the job then it works. Cheers Simon. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Txema Heredia Sent: 08 July 2014 10:32 To: [email protected] Subject: Re: [gridengine users] Combining STDIN and STDERR in a script sent through qsub Hi Simon, If you want your job to merge STDOUT and STDERR, you can use "qsub -j y" to merge both in a single file. Txema El 08/07/14 10:48, Simon Andrews escribió: > We're getting a really odd effect when trying to submit a script which merges > STDIN and STDERR to qsub. It looks like something is removing characters > from the command and the data is being sent into a file called 1 instead of > coming out of STDIN. A simple example is shown below: > > [andrewss@rocks1 Bug]$ more broken.sh > #!/usr/bin/bash > echo "Hello" 2>&1 > [andrewss@rocks1 Bug]$ qsub -cwd -V broken.sh Your job 201139 > ("broken.sh") has been submitted > [andrewss@rocks1 Bug]$ ls -ltr > total 78 > -rwxr-xr-x 1 andrewss bioinf 33 Jul 8 09:33 broken.sh > -rw-r--r-- 1 andrewss bioinf 0 Jul 8 09:35 broken.sh.e201139 > -rw-r--r-- 1 andrewss bioinf 84 Jul 8 09:35 broken.sh.o201139 > -rw-r--r-- 1 andrewss bioinf 8 Jul 8 09:35 1 > [andrewss@rocks1 Bug]$ more 1 > Hello 2 > > It looks like something is eating the & so the command which is being run is > simply: > > echo Hello 2>1 > > Any idea why this might be happening or suggestions for a work round? > > Thanks > > Simon. > > The Babraham Institute, Babraham Research Campus, Cambridge CB22 3AT > Registered Charity No. 1053902. > The information transmitted in this email is directed only to the > addressee. If you received this in error, please contact the sender > and delete this email from your system. The contents of this e-mail > are the views of the sender and do not necessarily represent the views > of the Babraham Institute. Full conditions at: > www.babraham.ac.uk<http://www.babraham.ac.uk/terms> > > _______________________________________________ > users mailing list > [email protected] > https://gridengine.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users The Babraham Institute, Babraham Research Campus, Cambridge CB22 3AT Registered Charity No. 1053902. The information transmitted in this email is directed only to the addressee. If you received this in error, please contact the sender and delete this email from your system. The contents of this e-mail are the views of the sender and do not necessarily represent the views of the Babraham Institute. Full conditions at: www.babraham.ac.uk<http://www.babraham.ac.uk/terms> _______________________________________________ users mailing list [email protected] https://gridengine.org/mailman/listinfo/users
