Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

Access ksh output from the DOS command line

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Access ksh output from the DOS command line Page: [1]
Login
Message << Older Topic   Newer Topic >>
Access ksh output from the DOS command line - Jan. 25, '06, 4:53:40 PM   
edalzell

 

Posts: 9
Joined: Jan. 25, '06,
Status: offline
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
Post #: 1
RE: Access ksh output from the DOS command line - Jan. 25, '06, 5:03:22 PM   
eperea

 

Posts: 40
Joined: Apr. 6, '05,
Status: offline
quote:

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.

(in reply to edalzell)
Post #: 2
[Deleted] - Jan. 25, '06, 5:07:25 PM   
edalzell
Post has been moved to the Recycle Bin at Jan. 25, '06, 5:10:01 PM by edalzell
Post #: 3
RE: Access ksh output from the DOS command line - Jan. 25, '06, 5:10:21 PM   
edalzell

 

Posts: 9
Joined: Jan. 25, '06,
Status: offline
quote:

ORIGINAL: eperea

quote:

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!!

(in reply to eperea)
Post #: 4
RE: Access ksh output from the DOS command line - Jan. 26, '06, 8:54:22 AM   
gwojan

 

Posts: 19
Joined: Apr. 28, '04,
Status: offline
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

(in reply to edalzell)
Post #: 5
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Interix Advanced Forum >> Access ksh output from the DOS command line Page: [1]
Jump to:





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


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047