dlangschied
Member
I do not think that this is possible, 'cus Lord knows I have tried, but I will throw it out there.
I would like to store the output of an os-command into a variable. I know that I could have the output stored to a file on the os and the content read back into the procedure, but I thought that maybe I could make it cleaner.
Situation:
I have a user that has a session that needs to be killed. I can only kill in promon as root, but that is dangerous to let the support group do that.
I have a procedure that, when run, generates a list of users to disconnect. The support group selects the user and a cron job, run as root, performs the kill in promon using a keyfile generated by the procedure.
Problem:
Recently we addded ODBC to the mix and now we have a single db user and all others show up in promon as blank (curses!).
Proposed resolution:
Go out and match the pid with the user that created it on the OS. This will now allow the list to contain the info that the support group needs; problem solved.
So...
I know what I need to do. I just want to make it as clean as possible. If I get the pid from the os, using os-command, can I store it directly to a variable (or am I SOL?)
Any suggestions?
I would like to store the output of an os-command into a variable. I know that I could have the output stored to a file on the os and the content read back into the procedure, but I thought that maybe I could make it cleaner.
Situation:
I have a user that has a session that needs to be killed. I can only kill in promon as root, but that is dangerous to let the support group do that.
I have a procedure that, when run, generates a list of users to disconnect. The support group selects the user and a cron job, run as root, performs the kill in promon using a keyfile generated by the procedure.
Problem:
Recently we addded ODBC to the mix and now we have a single db user and all others show up in promon as blank (curses!).
Proposed resolution:
Go out and match the pid with the user that created it on the OS. This will now allow the list to contain the info that the support group needs; problem solved.
So...
I know what I need to do. I just want to make it as clean as possible. If I get the pid from the os, using os-command, can I store it directly to a variable (or am I SOL?)
Any suggestions?