All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
Command works in KSH, but not in DOS Shell?
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login |
|
|
Command works in KSH, but not in DOS Shell? - Jan. 31, '06, 3:45:53 PM
|
|
|
edalzell
Posts: 9
Joined: Jan. 25, '06,
Status: offline
|
I am trying to determine if my program is running. If I run:
ps -ef |grep inNMT|grep -v grep
in the KSH and it returns something, my program is running. If nothing is
returned, my program isn't running. Simple, right?
The problem is that when I make the same call from the commandline:
posix.exe /u /c /bin/ksh -l -c ps -ef |grep inNMT|grep -v grep
nothing is ever returned!
Does grep not output to stdout?
Thanks
|
|
|
RE: Command works in KSH, but not in DOS Shell? - Jan. 31, '06, 3:56:32 PM
|
|
|
edalzell
Posts: 9
Joined: Jan. 25, '06,
Status: offline
|
Turns out you have to surround the ps stuff with quotes, i.e.
posix.exe /u /c /bin/ksh -l -c "ps -ef |grep inNMT|grep -v grep"
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|