On 8 ÄÅË, 01:36, Jolly Roger wrote:
> In article
> ,
>
>
>
> šalgo wrote:
> > I have open SSH session in Terminal.
>
> > How can I get current hostname and working dir from that session ?
>
> > I tried "do shell script hostname", but that returns hostname of my
> > host, not remote computer.
>
> > I also tried ways like
>
> > š š do script "echo `pwd``" in (selected tab of win)
> > š š set dir to (get contents of (selected tab of win))
>
> > But result of pwd command appears in terminal contents only after
> > applescript finishes.
>
I want to call command in terminal and get its output
while in SSH.
And then use Finder to open the folder.
It seems there is nothing more suitable then AS
> > What to do ?
>
> > P.S
> > Actually I want SSH hostname & pwd to open /Volumes/<hostname><pwd>
> > folder in finder, so I can easily "chdir" to remote host (mounted
> > using sshfs to /Volumes/<hostname>).
>
> AppleScript isn't the right tool for this job.
>
> --
> Send responses to the relevant news group rather than email to me.
> E-mail sent to this address may be devoured by my very hungry SPAM
> filter. Due to Google's refusal to prevent spammers from posting
> messages through their servers, I often ignore posts from Google
> Groups. Use a real news client if you want me to see your posts.
>
> JR >> Stay informed about: Get hostname & pwd from terminal ssh session