🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
3 messages
3 total messages Started by Sean Sheridan Coleman X5672 Sun, 09 Dec 1990 21:51
how to use the -t option in csh
#1927
Author: Sean Sheridan Coleman X5672
Date: Sun, 09 Dec 1990 21:51
17 lines
743 bytes
What is the purpose of the -t option in csh and 
how does one use it. I tryed to use it  doing the
following:

/bin/csh -t "ps ax; cat ~/.login"

It just sat there until I enterd a return the second time.

I have SunOS 4.1

Thanks

Sean Coleman
NIST
Boulder, CO 

coleman@bldrdoc.gov
Re: how to use the -t option in csh
#1928
Author: Jonathan I. Kamens
Date: Sun, 09 Dec 1990 23:38
29 lines
1736 bytes
In article <6145@alpha.cam.nist.gov>, coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes:
|> What is the purpose of the -t option in csh and 
|> how does one use it. I tryed to use it  doing the
|> following:
|> 
|> /bin/csh -t "ps ax; cat ~/.login"
|> 
|> It just sat there until I enterd a return the second time.

My csh(1) (BSD 4.3) says:

     -t   A single line of input is read and executed.  A `\' may
          be used to escape the newline at the end of this line
          and continue onto another line.

Note that the input is read *from the standard input*, not from the command
line; you appear to be attempting to use the option as if the input is read
from the command line.  For that, I believe what you want to use is the -c
option, not the -t option.  Again, from my man page:

     -c   Commands are read from the (single) following argument
          which must be present.  Any remaining arguments are
          placed in argv.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710
Re: how to use the -t option in csh
#1967
Author: Guy Harris
Date: Sat, 15 Dec 1990 01:17
19 lines
1213 bytes
>What is the purpose of the -t option in csh and 
>how does one use it.

Mr. Kamens' explanation of how to use it, and why you probably don't
want to use it, is correct.

I assume the purpose for it is the same as the purpose for "-t" flags in
other shells, dating back to the V6 shell, which is that it's there for
the benefit of "ed"'s "!" command.

The V6 "ed" used "read()" to read its command line one character at a
time.  If it discovered that the character was a "!", as I remember it
would then fire off a shell with the "-t" flag, and that shell would
then read the rest of the line.  I forget whether the original V6 shell
(we're talking V6, an OS that came out in 1975, folks...) even had a
"-c" flag.

I don't think many programs bother using the "-t" flag any more; they
tend to use "-c" instead.
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