Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
On Tue, 28 Jun 2022 05:19:46 -0700 (PDT), INDRANIL CHAKRABORTY <indranilcha@gmail.com> wrote:
Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" >>
This is, asking for Y/N to run. I want to give Y automatically without human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
As with most anything, there are lots of ways. Red's idea works. You could also create a text file (OSS or Guardian) with a single line in it with a 'Y'.
Then:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </path/to/yesfile.txt
or
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvolyesfile
On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give
the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh
/home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without
human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
osh / ... / -c "echo y | sh /home/..../restart"
On 6/28/2022 8:56 AM, red floyd wrote:Hello Sir,
On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:
Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give
the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh
/home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without
human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
osh / ... / -c "echo y | sh /home/..../restart"There is an error in this code. Correct is:
osh / ... / -c "echo y ~| sh /home/.../restart"
The ~ is needed to escape the pipe symbol, which
is a TACL metacharacter.
On Wednesday, June 29, 2022 at 4:42:29 AM UTC+5:30, red floyd wrote:
On 6/28/2022 8:56 AM, red floyd wrote:Hello Sir,
On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:There is an error in this code. Correct is:
Hello All,
I am trying to prepare a TACL script which will call an OSS script.
But, That OSS script asks for consent (Y/N) to run. So how I can give
the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh
/home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without >>>> human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
osh / ... / -c "echo y | sh /home/..../restart"
osh / ... / -c "echo y ~| sh /home/.../restart"
The ~ is needed to escape the pipe symbol, which
is a TACL metacharacter.
I have used the both the below commands:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvol/yesfile
osh / ... / -c "echo y ~| sh /home/.../restart"
it is working for other files but for restart it is throwing the below error:
Do you wish to continue? (y/[n]): httpd: (#216) configuration script 'httpd.config' failed
not a tty
child process exited abnormally
It only stops the pathmon $PQRS but, does not start that. Throwing the above error.
Please suggest.
Thanks,
Indranil
On 6/29/2022 5:44 AM, INDRANIL CHAKRABORTY wrote:
On Wednesday, June 29, 2022 at 4:42:29 AM UTC+5:30, red floyd wrote:
On 6/28/2022 8:56 AM, red floyd wrote:Hello Sir,
On 6/28/2022 5:19 AM, INDRANIL CHAKRABORTY wrote:There is an error in this code. Correct is:
Hello All,
I am trying to prepare a TACL script which will call an OSS script. >>>> But, That OSS script asks for consent (Y/N) to run. So how I can give >>>> the consent "Y" automatically from the script?
I am using the below command:
osh /jobid 1/-osstty -c "sh
/home/xxxxxx.mgr/soapservices/xxx/conf/restart"
This is, asking for Y/N to run. I want to give Y automatically without >>>> human intervention. As it will run from Netbatch.
Can anyone help on this please.
Thanks,
Indranil
osh / ... / -c "echo y | sh /home/..../restart"
osh / ... / -c "echo y ~| sh /home/.../restart"
The ~ is needed to escape the pipe symbol, which
is a TACL metacharacter.
I have used the both the below commands:
osh /jobid 1/-osstty -c "sh /home/xxxxxx.mgr/soapservices/xxx/conf/restart" </G/vol/subvol/yesfile
osh / ... / -c "echo y ~| sh /home/.../restart"
it is working for other files but for restart it is throwing the below error:
Do you wish to continue? (y/[n]): httpd: (#216) configuration script 'httpd.config' failed
not a tty
child process exited abnormally
It only stops the pathmon $PQRS but, does not start that. Throwing the above error.
Please suggest.
Thanks,OK, it looks like it's trying to read directly from the terminal, not
Indranil
from standard input. You may need to use the temp file, and use the
/TERM xxx/ option to the OSH command.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 05:09:02 |
Calls: | 10,386 |
Calls today: | 1 |
Files: | 14,058 |
Messages: | 6,416,629 |