Sorry for another post about Linux stuff. I'm running an Amazon instance. I have to use sudo to run commands - makes sense. But I'm struggling to get the Progress utilities working.
[ec2-user@ip-172-31-7-139 db]$ sudo $DLC/bin/_proutil sports2000 -C dbanalys
proutil: _dbutil was not found.
I've worked out that using sudo visudo I can edit the path and environment variables so the path is correct and I've added DLC. Yet it still doesn't work.
If I run _dbuitl direct it works ok, but there's stuff I still can't work out. like how to pipe the dbanalys to file.
In your environment setup, also add the $DLC/bin directory to the path and export it.
export PATH=$DLC/bin:$PATH
Once you have your PATH situation resolved, you just redirect the output to a file:
sudo $DLC/bin/_proutil sports2000 -C dbanalys > /tmp/sportsdbanal.txt
Ouch I had a typo in the path. Stupid me!
And the /tmp was the key to the redirect. Wouldn't write to the folder I wanted to. Getting my head around these permissions is fun!
Thanks for the quick help.
sudo doesn't preserve your environment, see env_keep directive in sudoers file
you may want to add DLC to env_keep if you have access to the sudoers config
BTW, I would be more comfortable when things are setup in such a way that I don't need root rights to do my db maintenance.
I'd agree, but sometimes you have to live with what you're given. :)