Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access ksh output from the DOS command line
2006-01-25, 12:53 PM
Post: #1
Access ksh output from the DOS command line
I can now successfully invoke commands in the ksh. I now (of course) have another problem. I can't get anything that is printed out in the KSH to appear properly in the DOS prompt. For example if you run:
posix.exe /u /c /bin/ksh -l /bin/cal

You get some garbage on the command line:
/bin/cal[1]: MZÉ♥♦ ©@╚♫▼║♫┤: not found
/bin/cal: syntax error: `p^A$H^C³' unexpected
/bin/cal[3]: $Þ: not found
/bin/cal[4]: syntax error: `(' unexpected

So obviously there is a disconnect somewhere.

Does anyone know of any way to connect the KSH output stream with stdout on
the command prompt.

Alternatively, is there an API that let's me do this instead of using the
commandline? My thinking there is that someone probably already thought of
this and I could take advantage of that.

Thanks

emd
Find all posts by this user
Quote this message in a reply
2006-01-25, 01:03 PM
Post: #2
RE: Access ksh output from the DOS command line

posix.exe /u /c /bin/ksh -l /bin/cal


Try

posix.exe /u /c /bin/ksh -l -c /bin/cal

You need the -c switch here.
Find all posts by this user
Quote this message in a reply
2006-01-25, 01:10 PM
Post: #3
RE: Access ksh output from the DOS command line

ORIGINAL: eperea


posix.exe /u /c /bin/ksh -l /bin/cal


Try

posix.exe /u /c /bin/ksh -l -c /bin/cal

You need the -c switch here.


Thanks man, that did the trick!!
Find all posts by this user
Quote this message in a reply
2006-01-26, 03:54 AM
Post: #4
RE: Access ksh output from the DOS command line
To make it even better, create a doskey macro like

ksh=posix.exe /u /c /bin/ksh -l -c $*

and now you can just use ksh cal or

ksh=posix.exe /u /c /bin/ksh -l -c cal you get the idea.

Very cool...

--Greg
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)