🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sgi.misc
5 messages
5 total messages Started by Vamsee Lakamsani Tue, 05 Jan 1993 21:16
strange problem with command execution at xwsh startup
#146
Author: Vamsee Lakamsani
Date: Tue, 05 Jan 1993 21:16
18 lines
993 bytes
%xwsh -e rlogin <any-host>

The above command works on this SGI (Indigo 4.0.5A). But,

%xwsh -e /bin/ls
%xwsh -e cd /usr/people/vamsee/junk
%xwsh -e chdir /usr/people/vamsee/junk
%xwsh -e cd /usr/people/vamsee/junk; vi <somefile>

don't work. The man page says:

" The -e option will pass all trailing arguments to xwsh , to be
   executed as a command line."

What's the difference ? Why does rlogin work and the others don't?
There must be a way to do this simple thing. Any help is appreciated.

Vamsee
Re: strange problem with command execution at xwsh startup
#148
Author: Kipp Hickman
Date: Tue, 05 Jan 1993 21:37
19 lines
1216 bytes
In article <1ictqqINNk4a@tamsun.tamu.edu>, vamsee@abgen.tamu.edu writes:
> %xwsh -e rlogin <any-host>
> 
> The above command works on this SGI (Indigo 4.0.5A). But,
> 
> %xwsh -e /bin/ls
This will work, it just exit's immediately after finishing.  Try adding
the "-hold" option if you want wsh to hang around after finishing monitoring
the subprocess.
> %xwsh -e cd /usr/people/vamsee/junk
> %xwsh -e chdir /usr/people/vamsee/junk
> %xwsh -e cd /usr/people/vamsee/junk; vi <somefile>
These will never work because there is no such program called "cd".  When
you give xwsh the "-e" option you are changing its notion of the shell to
use to a specific program.  The arguments you give are just exec'd, not
run through another shell.

					kipp
Re: strange problem with command execution at xwsh startup
#163
Author: Jim Moore
Date: Wed, 06 Jan 1993 14:49
51 lines
1901 bytes
In article <1ictqqINNk4a@tamsun.tamu.edu> vamsee@abgen.tamu.edu (Vamsee Lakamsani) writes:
>%xwsh -e rlogin <any-host>
>
>The above command works on this SGI (Indigo 4.0.5A). But,
>
>%xwsh -e /bin/ls
>%xwsh -e cd /usr/people/vamsee/junk
>%xwsh -e chdir /usr/people/vamsee/junk
>%xwsh -e cd /usr/people/vamsee/junk; vi <somefile>
>
>don't work. The man page says:
>
>" The -e option will pass all trailing arguments to xwsh , to be
>   executed as a command line."
>
>What's the difference ? Why does rlogin work and the others don't?
>There must be a way to do this simple thing. Any help is appreciated.
>
>Vamsee
>
-----------------------------------------------
Response:
xwsh terminates immediately after the commands terminate.
rlogin doesn't terminate, therefore the window hangs around.

SGI provided a command file with buttonfly that I have used in the past.
It contains the following:

#! /bin/csh -f
$*
echo -n "<ENTER to continue>"
set foo $<

I called this "mywsh".  It is used as follows:

xwsh -e mywsh ls

It executes the command then waits for you to terminate it after it completes.

By the way, 
    %xwsh -e cd /usr/people/vamsee/junk; vi <somefile>
is the same as:
    %xwsh -e cd /usr/people/vamsee/junk
    % vi <somefile>
The ";" signifies the end of the xwsh command.

-- 
Jim Moore                       Hughes Training Inc.
Phone: (612) 572-7721           5301 East River Road
Fax:   (612) 572-7732           Mpls, Mn. 55421-1024
Email: jfm@asf.com              USA
Re: strange problem with command execution at xwsh startup
#164
Author: Hemant Shah
Date: Wed, 06 Jan 1993 20:46
36 lines
2121 bytes
In article <1icv27INN6f2@fido.asd.sgi.com>, kipp@warp.asd.sgi.com (Kipp Hickman) writes:
|> 
|> In article <1ictqqINNk4a@tamsun.tamu.edu>, vamsee@abgen.tamu.edu writes:
|> > %xwsh -e rlogin <any-host>
|> > 
|> > The above command works on this SGI (Indigo 4.0.5A). But,
|> > 
|> > %xwsh -e /bin/ls
|> This will work, it just exit's immediately after finishing.  Try adding
|> the "-hold" option if you want wsh to hang around after finishing monitoring
|> the subprocess.
|> > %xwsh -e cd /usr/people/vamsee/junk
|> > %xwsh -e chdir /usr/people/vamsee/junk
|> > %xwsh -e cd /usr/people/vamsee/junk; vi <somefile>
|> These will never work because there is no such program called "cd".  When
|> you give xwsh the "-e" option you are changing its notion of the shell to
|> use to a specific program.  The arguments you give are just exec'd, not
|> run through another shell.
|> 
|> 					kipp

Try following:

%xwsh -e "/bin/sh -c cd /usr/people/vamsee/junk"
   . 
   .
   .
etc.
------------------------------------------------------------------------------
Hemant Shah                            | All the opinions expressed are my own
Fermi National Accelerator Laboratory  | and does not necessarily reflect
Systems Integration Group              | those of Fermilab.
E-mail :shah@fnal.fnal.gov             |
 Voice : (708) 840-8071	               | I haven't lost my mind
   Fax : (708) 840-2783                | it's backed on tape somewhere.
-------------------------------------------------------------------------------
Re: strange problem with command execution at xwsh startup
#168
Author: John M. O'Donnell
Date: Thu, 07 Jan 1993 04:28
20 lines
1245 bytes
In article <1993Jan6.144904.4811@asf.com>, jfm@asf.com (Jim Moore) writes...
>Response:
>xwsh terminates immediately after the commands terminate.
>rlogin doesn't terminate, therefore the window hangs around.
> 
>SGI provided a command file with buttonfly that I have used in the past.
>It contains the following:
> 
>#! /bin/csh -f
>$*
>echo -n "<ENTER to continue>"
>set foo $<
> 
>I called this "mywsh".  It is used as follows:
> 
>xwsh -e mywsh ls
> 
>It executes the command then waits for you to terminate it after it completes.
> 
xwsh -h saves a lot of messing around with extra files like mywsh
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads