Ah, ok. This is good to know....
-v works for functions....

I hope we can get -V fixed sometime in the future.
Users with large environments set up would like to have their functions
if defined to be transferred across also...but there are workarounds...
so no rush...

-Ed



-----Original Message-----
From: Reuti [mailto:[email protected]]
Sent: Tuesday, June 4, 2013 03:01 PM
To: 'Vamsi Krishna'
Cc: [email protected] Users
Subject: Re: [gridengine users] function to submit inside bash script

Am 04.06.2013 um 20:25 schrieb Vamsi Krishna:> Hi,
> 
> i have function insdie bash script> 
#!/bin/bash> 
test(){> echo "$HOSTNAME"> }
> qrsh -V -now no -pty y test 
> 
> can i submit function using qrsh interactive way If you want to submit from 
> inside a jobscript:
- it's necessary to source the settings file in the script:source 
/usr/sge/default/common/settings.sh
- the function needs to be exported:export -f test- the exechost needs to be 
also a submit host
- due to a bug the -V won't allow (depending on the version of SGE) to export 
functions, but "-v test" will.
(funny, I didn't notice the latter before)
#!/bin/bash
. /usr/sge/default/common/settings.sh
test(){ echo "$HOSTNAME"; }
export -f testqrsh -v test -now no -pty y test
-- Reuti
_______________________________________________users mailing 
[email protected]https://gridengine.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to