Capturing Output from net ads dns register Command
On Red Hat Enterprise Linux Server release 5.4, I'm trying to create a shell script that will register the system with a DNS server and capture the output of the command to a file. I have the following:
/usr/bin/net ads dns register -U MyUser%MyPassword > test.conf
The trouble is that no output ever shows up in the output file. If I remove the > test.conf, then I can see the output displayed, but I can't find a way to save it off to a file.
Note that I am able to capture output from other types of commands using > filename or >> filename at the end of the command. At seems like there's something special about this particular command that makes it difficult to capture output from it.
Thanks for any suggestions. --Joseph
Try '/usr/bin/net [args] 2>&1>test.conf' or (kind of lame) '/usr/bin/net [args] 2>/dev/null|tee /tmp/net.conf >/dev/null'?
>> Try '/usr/bin/net [args] 2>&1>test.conf' or (kind of lame) '/usr/bin/net [args] 2>/dev/null|tee /tmp/net.conf >/dev/null'?
Thanks unSpawn, I just gave these a try but they didn't succeed in capturing any output in the test.conf file.
Are there any other suggestions out there?
|All times are GMT -5. The time now is 09:41 PM.|