HDTenEightyP/NetNews huggingface dataset:
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: cat a > a , getting it straight
Date: 17 Dec 1992 06:45:16 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <1992Dec17.020805.28043@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
>Why does appending a to a with cat not work but wc a >> a does produce
>the output from wc that is expected?  

Because cat checks whether the input and output are the same file.  When
this is so, it prints the warning message and exits.  Wc (and most other
programs) doesn't check, so the expected thing happens.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.questions
From: dkeisen@leland.Stanford.EDU (Dave Eisen)
Subject: Re: Really stupid questions
Organization: Sequoia Peripherals, Inc.
Date: Fri, 18 Dec 92 08:52:04 GMT

In article <1992Dec18.043623.23417@credit.erin.utoronto.ca> glover@credit.erin.utoronto.ca (Mike Glover) writes:
>>3) Which shell is better?  I am currently using /bin/csh, but people keep
>>   telling me that I should use the Bourne shell. /bin/sh
>Heres a horseshoe in your world...How about tcsh.  I believe it to be the best
>shell I have run across yet.  I have used sh/csh/tcsh/ksh.  Of all of them
>I believe tcsh to be heads and shoulders above the rest.   If you are doing
>shell programming I prefer sh (but thats a personal choice)

I agree with your answers to all 4 questions, including your
recommendation of tcsh. All I disagree with is your statement
that for shell programming you prefer sh as a personal choice.

Nope. No personal choice here. sh is flat out better than csh. 
See Tom Christiansen's article "C Shell Programming Considered 
Harmful" for some reasons why.



-- 
Dave Eisen                               Sequoia Peripherals: (415) 967-5644
dkeisen@leland.Stanford.EDU              Home:                (415) 321-5154
       There's something in my library to offend everybody. 
          --- Washington Coalition Against Censorship
From: yeasah@bigwpi.WPI.EDU (Yeasah G. Pell)
Newsgroups: comp.unix.questions
Subject: socket timeouts
Date: 12 Dec 1992 00:13:00 GMT
Organization: Worcester Polytechnic Institute
NNTP-Posting-Host: bigwpi.wpi.edu

Hey wizzards!

	Q: How can one change the amount of time a connect() function
	   takes to time out when attempting to connect to an unconnected
	   address on the internet?  Currently it waits forever.  I
	   see the select() function has a value for timeout, but I
	   don't know if this is related to connect or not.

  Any help at all would be greatly appreciated!
		
		Thanks in advance,
			Yeasah Pell (yeasah@wpi.edu)

Newsgroups: comp.unix.questions
From: wcl@oakhill.sps.mot.com (Wayne Long)
Subject: Easy way to create unix man pages?
Keywords: unix manual hypertext
Organization: Motorola Inc., Austin, Texas
Date: Thu, 17 Dec 1992 16:49:19 GMT


I'm looking for a filter, utility, or editor that
will take normal, what-you-see-is-what-you get
text, and convert it into a unix man page with
minimal hassle.

I realize that some of the major sections and headings
would have to be delimeted in some way, but I'd like to
be able to do this editing with a normal text editor
(or framemaker or MacIntosh Word) in as minimally
cryptic way as possible.


Wayne

-- 
-------------------------------------------------------------------
Wayne Long                      Internet: wcl@risc.sps.mot.com
6501 William Cannon Drive West  UUCP: cs.texas.edu!oakhill!risc!wcl
Austin, Texas 78735-8598        Phone (512) 891-4649
Newsgroups: comp.unix.questions
From: ray@Celestial.COM (Ray Jones)
Subject: Re: Command to parse text...
Organization: Celestial Software, Mercer Island, WA
Date: Fri, 11 Dec 1992 19:45:27 GMT

In <lux.723676699@sol.UVic.CA> lux@sol.UVic.CA (Michael O'Henly) writes:

>    I need a command that will take a line of input that looks like
>this...

>        /is/gd/.int_res/.text/.lib/.docs/filename

>    ...and return the string "filename". In other words, it's got to
>return all the text between the last "/" and the end of the input
>line.

>    Can you help me? Sed and regular expressions are still quite a
>mystery to me...!

There is a specific command to do exactly what you want in most instances.
The command is:
basename
-- 
INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Software
UUCP:   ...!thebes!camco!ray   6641 East Mercer Way
             uunet!camco!ray   Mercer Island, WA 98040; (206) 947-5591
The probability of one or more spelling errors in this missive approaches
Newsgroups: comp.unix.questions
From: jeffo@uiuc.edu (J.B. Nicholson-Owens)
Subject: Re: Need a tool to 'unzip' files in a Unix environment
Reply-To: jeffo@uiuc.edu (J.B. Nicholson-Owens)
Organization: University of Illinois at Urbana
Date: Sun, 20 Dec 1992 01:23:40 GMT

David Fox writes
> Needless to say, there are others to choose from.  Take a look at lha
> and or arj.  These typically do a better job than zip.

I've not had this experience.  My experience has been that zip v1.9  
does a better job (using the -9 option) than lha v1.00; both being run  
on a NeXTSTEP 3.0 machine.

I don't know about the availability of an arj for UNIX, last I checked  
there was none (not even a de-arj'er).
-- 
-- Jeff (jeffo@uiuc.edu)
-- NeXTmail welcome
Newsgroups: comp.unix.questions
From: tma@encore.com (Thanh Ma)
Subject: HELP PLEASE! /usr filesystem is full ...
Organization: Encore Computer Corporation
Date: Thu, 17 Dec 1992 21:03:01 GMT

The /usr filesystem is full when I try to install Motif. I installed a
second hard disk. What I would like to do is to make a /usr filesystem
on the second disk to be a replacement to the /usr filesystem on the
first hard disk but I don't know how to go about it. Please show me how
to do it. Also how do I reclaim the space of /usr on the 1st disk when
it is removed ?

Thanks in advance.

thanh
tma@encore.com
Newsgroups: comp.unix.questions
From: David Ruggiero <osiris@halcyon.com>
Subject: What do *you* use to format mail?
Originator: osiris@halcyon.com
Reply-To: osiris@halcyon.halcyon.com (David Ruggiero)
Organization: [none - why fight entropy?]
Date: Sun, 13 Dec 1992 09:11:56 GMT

Now that I've finally learned how to send what I'm editing with vi
through a filter, I'd like to automate my most tedious emailing task...
The idea here is to find (and give credit to) the lone hacker out there
with the most fiendishly elegant sed/awk/nawk/perl/shell routine to format
their mail messages. By this, I mean at the least taking a block of
random text and:

1) Evenly formatting the lines to a preset (or specified) length, 
   performing concatenations and wrapping as necessary.

2) Preceding each formatted line with a variable character string
   (such as the "> " to indicate the text being replied to).

3) (Optionally) preserving blank lines within the text.

Other nifty functions (passing to the spell checker, allowing indentation
control and/or preservation, etc.) would be neat, too, but the three things
above are the meat of the questions.

I will post the best solutions(s) I receive (but that shouldn't dissuade
anyone from posting themselves if they have a good/favorite routine them-
selves).

Thanks for your input and advice...David

-- 
David Ruggiero  (jdavid@halcyon.com)       Seattle, WA: Home of the Moss People
From: ioi@stipple.seas.upenn.edu (Ioi Kim Lam)
Newsgroups: comp.unix.questions
Subject: How to spy on other people's ttys?
Date: 14 Dec 92 03:12:30 GMT
Organization: University of Pennsylvania


Hey guys, I know this is nasty, but does anyone know how to spy on other
people's tty's? Can you do it with any of the /dev/ttyxx?


ioi.

Newsgroups: comp.unix.questions
From: chetal@is.morgan.com (Pradeep Chetal)
Subject: Re: PERL PARSING
Organization: Information Services, Morgan Stanley, NYC
Date: Tue, 15 Dec 1992 10:46:38 GMT

In article <1992Dec15.172048@is.morgan.com> holger@is.morgan.com (Holger Veith) writes:

   What is the best way to parse a string within PERL where I would like it
   to behave sort of like ksh.

   I have used the split command by splitting on white space, but I would
   like everything enclosed in quotes to be one string.

   ie.

   $x='please "help me split" this line';

   ->  $a[1]='please'
       $a[2]='help me split'
       $a[3]='this'
       $a[4]='line'


   Thank you,

   Holger.


require "shellwords.pl";
$x='Please "help me split" this line';
@X=&shellwords($x);
print "X[0]=$X[0],X[1]=$X[1]\n";


/Pradeep
--
----------------------------------------------------------------------------
Pradeep Chetal		UUCP:	...!uunet!is.morgan.com!chetal
Morgan Stanley		Internet: 	chetal@is.morgan.com
1633 Broadway,		Phone:		(212) 703-2220 (O)
NY, NY 10019				(212) 703-2371 (FAX)
            _______________    __o
        _________________     -\<,
                        ......O/ O
From: walt@bcarh1d7.bnr.ca (Walt Sullivan)
Newsgroups: comp.unix.questions
Subject: Re: Command to parse text...
Date: 14 Dec 92 18:38:26 GMT
Organization: Bell-Northern Research, Ottawa, Canada
In-reply-to: kwak@cunixf.cc.columbia.edu's message of 6 Dec 92 23:07:58 GMT

>>>>> On 6 Dec 92 23:07:58 GMT, kwak@cunixf.cc.columbia.edu (Nancy Kwak) said:
Nancy> Nntp-Posting-Host: cunixf.cc.columbia.edu

Nancy> In article <lux.723676699@sol.UVic.CA> lux@sol.UVic.CA (Michael O'Henly) writes:
>    I need a command that will take a line of input that looks like
>this...
>
>        /is/gd/.int_res/.text/.lib/.docs/filename
>
>    ...and return the string "filename". In other words, it's got to
>return all the text between the last "/" and the end of the input
>line.

Nancy> 	this should do it.

Nancy> 	for $a = "/usr/abc/file" or just "file"

Nancy> 	expr $a : '.*/\(.*\)' \| $a

what's wrong with basename(1)?

a="/is/gd/.int_res/.text/.lib/.docs/filename"
echo "`basename $a`"

produces

filename"


--
Walt Sullivan
INTERNET: walt@bnr.ca (work)
UUCP: walt@orbit.ocunix.on.ca (home)
FIDO: 1:163/109.4
Newsgroups: comp.unix.questions
From: jessica.bvl.pt!root (Operator)
Subject: Re: How to restore from dump tapes on AIX
Organization: Bolsa de Valores de Lisboa
Date: Wed, 16 Dec 1992 12:37:33 GMT

In article <1992Dec11.232836.915@athena.mit.edu> herrera@athena.mit.edu  
(Ramon F Herrera) writes:

> My question is:  Given that I have my backup tapes,
> how can I find out what were the partitions of
> the hard disk (the precise sizes) before the crash?
> 
> Does AIX have something functionally equivalent to
> Sun 'format' or 'dkinfo'?

What's the format of the backups ?
Backup by name or by i-node ?

Anyhow, in any of this cases, you will have to re-create the filesystems
by hand, and then restore the files.
Take a look in what IBM call 'image', with this technic you may create an
image of your system, all mounted file systems will be dumped to tape
and you can latter restore them in just one go (note that the hardware
information, tty, printers and so on, is not saved).
With this image tape, you can boot from the flopies and install this
image tape. It's possible to create a boot tape, but I don't remember
how... I'm far from AIX for about half an year now.

regards,
vasco.
From: bhoughto@sedona.intel.com (Blair P. Houghton)
Newsgroups: comp.unix.questions
Subject: Re: how do you center a line in vi/ex ???
Date: 14 Dec 92 20:26:10 GMT
Organization: Intel Corp., Chandler, Arizona
NNTP-Posting-Host: alfalfa.intel.com

In article <1992Dec14.054911.9921@news.mentorg.com> thiam-chye_sim@mentorg.com writes:
>In article <1992Dec11.040216.14337@umbc3.umbc.edu>, rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
>|> map v :s/^[ 	]*//^M:s/[ 	]*$//^M$ma81a 81^V|D`alxd0:s/  / /g^M$p
>
>I added the statement to my .exrc file, but it does not do its job.
>There was a message flash across the screen when I invoke, how can I view
>that message. Is it log somewhere or how can I get the screen to freeze?

It's not logged and the screen won't freeze unless you
have XON/XOFF (^Q/^S) or something.

Two things may be happening.

1.  You didn't add the escape character that was missing:

  map v :s/^[     ]*//^M:s/[      ]*$//^M$ma81a ^[81^V|D`alxd0:s/  / /g^M$p
                                              --

2.  You copied the string exactly.  This is bad because
several of the characters you see are actually supposed to
be control characters.  It's not encoded as control characters
in the news posting because news has a tendency to munge
control characters.  An X11 yank-n-stuff action (select and
copy with the mouse via the X cut-buffer) would translate a
control character to an upcaret and a character, since
that's what is actually on your screen (that is, it's your
terminal that does the translation when it displays, not
the mouse when it copies).

The ones that are control characters are underlined below.

  map v :s/^[     ]*//^M:s/[      ]*$//^M$ma81a ^[81^V|D`alxd0:s/  / /g^M$p
           **bt..t    --    bt...t     --       --  --           bb b  --

You can enter them by typing a ctrl-V (^V) and then ctrl-M (^M),
or ESC (^[), or ctrl-V (^V) again.

The sequence marked "**" above is not a control character, it's
an upcaret and a left square bracket.

Each space character is marked with "b", and each (expanded)
tab character is marked with "t..t"  The news doesn't mess up
tabs, but yank-n-stuff does translate them into spaces.  The
listing given when you type ":map" in vi shows them as "^I".


Basically, you can't just edit what you see in the news to
make vi macros.  You have to figure out what you're looking
at and make sure to use real control characters in the
right places.

				--Blair
				  "map V o^I^I^I^I--Blair^M  ""

P.S.  I'm not going to be so crass as to suggest that this
sub-notation {--,**,b,t..t} be adopted as a standard.
Posters should just be clear about what they mean when they
post control sequences.
From: sn@plato.chemietechnik.uni-dortmund.de (sn)
Newsgroups: comp.unix.questions
Subject: Re: Looking for 386BSD FAQ
Keywords: FAQ BSD
Date: 14 Dec 92 17:46:38 GMT

a1001032@cdf.toronto.edu (Fiona Wong) writes:

>In article <92121398@erato.iowa-city.ia.us> jdb@erato.iowa-city.ia.us (John D. Boggs) writes:
>>I'm looking for a FAQ for 386BSD (or BSD386, whichever it is. .  .   .    )
>>
>>Could someone point me to it, or mail it to me?  Thanks.
>>
>>-John D. Boggs     jdb@erato.iowa-city.ia.us

Read Terry Lambert's signature in comp.unix.bsd .. He wrote it...
It think it's available via anonymous ftp from agate.berkeley.edu
in /pub/386bsd/386bsd-0.1/unofficial/terry
(or something similar)

Sven
Newsgroups: comp.unix.questions
From: erodrigu@dcc.uchile.cl (Eduardo Rodriguez)
Subject: Re: BINHEX encoder/decoder for Unix?
Originator: erodrigu@tolten
Date: Wed, 16 Dec 1992 18:19:50 GMT
Organization: Universidad de Chile, Depto. de Ciencias de la Computacion


In article <5026@equinox.unr.edu>, malc@equinox.unr.edu (Malcolm Carlock) writes
:
> Does anyone know of a BINHEX decoder (and, hopefully, encoder) that
> will run on Unix?
>
> I've checked archie, and been unable to find anything with "binhex"
> in the name.

Try mcvert, that's the name in UNIX enviroment.

edo...

 ////  Fortuna mia la de             ```\  .     Eduardo Rodriguez     .
 c-OO  concurrir aqui, por           OO-c   .  erodrigu@dcc.uchile.cl   .
    \  virtud de la palabra.         /     . Dpto Cs de la Computacion .
   -                         *bow*    -     .   Universidad de Chile    .

Newsgroups: comp.unix.questions,comp.unix.shell
From: ray@Celestial.COM (Ray Jones)
Subject: Re: Redirection of the Echo command to other tty's
Organization: Celestial Software, Mercer Island, WA
Date: Sat, 19 Dec 1992 19:00:00 GMT
Keywords: unix echo shell 

In <1992Dec14.222553.22768@sactoh0.sac.ca.us> dwj@sactoh0.sac.ca.us (Daniel W. James) writes:

>Unlike my usual questions, this one is quick, and hopefully the answer will
>be just as easy :)

>Let's say I type the following shell command: (SysV)
>----------------------------------------------------
>$ echo "Line One\nLine Two"
>I get the following output on *my* screen:
>----------------------------------------------------
>Line One
>Line Two

>However, if I type:
>----------------------------------------------------
>$ echotest.sh > /dev/console
>I get the following output on the console:
>----------------------------------------------------
>Line One
>        Line Two

>I.E., during redirection, the \n changes from cr/lf to just lf

>Do I need to use echo "Line One\n\rLine Two" during redirection???  Or is
>there some easier way (independent of redirection) to make sure the both
>the CR/LF sequence is output?

You might try
echo "Line One
Line Two" >/dev/console

-- 
INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Software
UUCP:   ...!thebes!camco!ray   6641 East Mercer Way
             uunet!camco!ray   Mercer Island, WA 98040; (206) 947-5591
The probability of one or more spelling errors in this missive approaches
Newsgroups: comp.unix.questions
From: lwall@netlabs.com (Larry Wall)
Subject: Re: PERL PARSING
Organization: NetLabs, Inc.
Date: Wed, 16 Dec 1992 21:37:13 GMT

In article <1992Dec15.172048@is.morgan.com> holger@is.morgan.com (Holger Veith) writes:
: What is the best way to parse a string within PERL where I would like it
: to behave sort of like ksh.
: 
: I have used the split command by splitting on white space, but I would
: like everything enclosed in quotes to be one string.
: 
: ie.
: 
: $x='please "help me split" this line';
: 
: ->  $a[1]='please'
:     $a[2]='help me split'
:     $a[3]='this'
:     $a[4]='line'

$ perl
require "shellwords.pl";
$x='please "help me split" this line';
@a = &shellwords($x);
$" = "\n"; 
print "@a\n";
__END__
please
help me split
this
line
$

Larry Wall
lwall@netlabs.com


Newsgroups: comp.unix.questions
From: jpr@jpradley.jpr.com (Jean-Pierre Radley)
Subject: Re: .exrc file for vi customization
Organization: Unix in NYC
Date: Sun, 13 Dec 1992 07:12:41 GMT

In article <MERLYN.92Dec10235241@romulus.reed.edu> merlyn@ora.com (Randal L. Schwartz) writes:
>In article <1992Dec09.171536.9561@ssc.com> fyl@ssc.com (Phil Hughes) writes:
>   I have one thing to add.  Much like Stephen's example I find that I need
>   different vi setups based on what I am working on.  To automate this
>   process I put the like
>       so .viset
>   in my .exrc file.  Whenever vi is started it looks for the file .viset in
>   the current directory.  If found, it reads it in much the same as it reads
>   .exrc.  If it doesn't find it an error message that that effect quickly
>   blinks on the status line and things continue.
>
>Hoo boy.  Would *I* love to be a user on your system if you do that
>*as root*.  (Heh, you probably have "." in your root's PATH as well.
>Sheesh. :-)
>
>Think about it.  You can fire off arbitrary shell commands from an ex
>script.  Not smart.

I'm thinking about it. If I do that as 'root' on my system, what difference
does it make to what you, as 'merlyn' on my system, would be able to do?

-- 
Jean-Pierre Radley   Unix in NYC   jpr@jpr.com   jpradley!jpr   CIS: 72160.1341
Newsgroups: comp.unix.questions
From: mpflugfe@nyx.cs.du.edu (Mike Pflugfelder)
Subject: Looking for a way to dial out from a Mips Unix box.
Keywords: modem tip
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Wed, 16 Dec 92 04:57:13 GMT


Here's the background on my problem.
I work for a software/hardware distributor, and currently, on every person's
desk, is: A Wyse 50 terminal, A/B switchbox, A modem, and a serial cable
to the terminal server.  What we want to do (because we have about 7 different
unix boxes) is to set up 1 machine with a bank of modems (the ones on the
desks), in order to dial out through the modems.  This would allow us to
also free up our desk telephones for voice only.  I've tried 'tip', and I
didn't get a reliable connection.  This is a problem, because our apps.
include ASCII graphics and control characters.  If we loose certain characters,
we could loose the whole screen, etc.  What I'm looking for, is an
application (commercial or otherwise) that would allow us to dial out and act
as a terminal, and later, enable us to do file transfers on the same type of
machine (unix).  I guess what I'm looking for is like a Telix, or Procomm
(DOS) type of utility for unix.

Finally, let me say that I've read the FAQ files, and I did not see anything
that would help me with this problem.  I'm not experienced enough at unix to
know how, or what SLIP does.  I've heard that it's some kind of Internet
Protocol or something. I don't know if this will solve my problem, but I should
say that some of the machines we will be calling might not have SLIP.

Please e-mail me at ucpflugf@mcs.drexel.edu as I don't read this newsgroup
very often.  Also, any help would be GREATLY appreciated.  I'll post my
findings if they are wanted.  THANKS.

-Mike
--
____________________________________________________________________
Internet: ucpflugf@mcs.drexel.edu                Wa on Adversary Mud
          Mike.Pflugfelder@bbs.oit.unc.edu        God on Drexel Diku
	  mpflugfe@nyx.cs.du.edu
From: dman@netcom.com (Dallman Ross)
Newsgroups: comp.unix.questions
Subject: Performing simple math on a numeric file from csh
Date: 16 Dec 92 08:03:43 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)
X-Newsreader: TIN [version 1.1 PL7]

I am trying to understand awk, but the man pages are driving me nuts. 
Anyway, I have a couple of simple files with numerics in them that I
want to do some math with.  This doesn't have to be via awk, but I've
been told that's the ticket.  Anyway, I use csh.
 
Here's what one of the files looks like:
 
> login:  Dec 15 21:40:01
> logout: Dec 15 21:40:18
> 
> login:  Dec 15 21:41:11
> logout: Dec 15 21:41:48
> 
> login:  Dec 15 22:20:08
> logout: Dec 15 22:31:44
> 
 
(No >'s in the file, of course.)  So, I want to subtract the
penultimate time figure from the last figure, and come up with
"00:11:36" as the answer for time logged in.  I only need to do the
math on the last pair.  The rest is just a running log.
 
Thanks for any advice.
 
--
 __D_a l_l m a_n  _ R o_s s _ |dman@netcom.com  /or/  |"You sound like a man|
 l  \\ l\\   /l  /\\  l\\   l |dross@well.sf.ca.us    |with a rubber nose." |
 l   >)l \\ /ll /  \\ l \\  l |vox/fax: 1.510.645.1883| -- One-Lung Bill    |
 l  // l  \X ll/--- \\l  \\ l |350 Perkins St., #108  |     Remmer (deceased)
_l//______________________\\l_|Oakland,_CA__94610-3422|_____________________|_
Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Re: REALLY STUPID QUESTIONS (not so stupid)
Organization: Northwestern University, Evanston Illinois.
Date: Sat, 19 Dec 1992 01:59:53 GMT

In article <BzGtv1.M5u@cs.dal.ca> franklin@ug.cs.dal.ca (Steve Franklin) writes:
>
> Elm is functional,

yep.

> and no-nonsense.
> Great aliasing capabilities and such.

<chuckle>. This seems like an oxymoron to me. I don't know about you but
in my version of elm, but I certainly wouldn't call this 'no-nonsense':

user1	=  joe cool user1	= user1@somewhere.someplace.someorganization
user2	=  joe cool user2	= user2@somewhere.someplace.someorganization

UserGroup =  My Cool User Friends 	= user1, user2

huh?

-tms



 
-- 
You can get further with a kind word | You can get further with a kind word
and a gun than a kind word alone.    | and a phaser than a kind word and a gun.
          --al capone                |           -- John Navarra
=======From the Lab of the MaD ScIenTIst....navarra@casbah.acns.nwu.edu========