592 lines
18 KiB
Plaintext
592 lines
18 KiB
Plaintext
H-NET H-NET H-NET H-NET H-NET H-NET H-NET H
|
|
N N
|
|
E ** H-Net Magazine ** E
|
|
T T
|
|
H Volume One, Issue 1, File #16 of 20 H
|
|
N N
|
|
E UNIX-HELP conf on UNAXCESS BBS, JANET E
|
|
T T
|
|
H-NET H-NET H-NET H-NET H-NET H-NET H-NET H
|
|
|
|
DETAILS : Unaxcess BBS - JANET address - 0000121100
|
|
|
|
UNAXCESS is a bbs that is run by Bradford University on the JANET (Joint
|
|
Academic) NETwork. Although it is very strictly run and you need to be a
|
|
student to gain access I did not find it much of a problem. They also have
|
|
a strict policy of no hacking chat - but with UNIX and VAX help conferences
|
|
I was still interested in it!! hehehe. Another interesting feature of the BBS
|
|
is it's chat mode 'T' from the main menu - about 8 lines I think.
|
|
|
|
Plenty of people seem to be slagging off JANET as boring these days - they are
|
|
usually the people who havent bothered to have a good look around - I mean
|
|
the La Palma Observatory hack was quite funny!! hehee
|
|
|
|
Message 277 (of 292, 28 more unread) in UNIX-HELP:
|
|
Date: Saturday, 7 April, 1990 - 5:27 PM
|
|
From: JOB
|
|
To: ANDIE
|
|
Subject: WhiteChapel Mg1
|
|
In-Reply-To: 263, 210
|
|
|
|
a maintenance floppy? Is that a special utils disk then?
|
|
hmm.. we don't have that.
|
|
Do you know anyone with an MG1?
|
|
cheers, Jason.
|
|
--
|
|
Replied-to-by: ANDIE
|
|
|
|
19:55 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 285 (of 292, 27 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 1:33 PM
|
|
From: ANDIE
|
|
To: JOB
|
|
Subject: WhiteChapel Mg1
|
|
In-Reply-To: 277, 263, 210
|
|
|
|
Yes. To make a new one, you need to "cd /usr/wcw; ./mkmflp"
|
|
but seeing as your usr partition is broken, this isn't much help.
|
|
|
|
I'm in the process of acquiring some Whitechapel spares...One of the broken
|
|
beasts is a MG-1. If I can generate a maintenace floppy from one, I'll let you
|
|
know.
|
|
|
|
--Andie.
|
|
|
|
19:44 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 264 (of 292, 26 more unread) in UNIX-HELP:
|
|
Date: Thursday, 29 March, 1990 - 10:39 PM
|
|
From: FRED
|
|
To: DYLAN
|
|
Subject: cd...
|
|
In-Reply-To: 261, 260, 259, 257, 256, 252
|
|
|
|
Or you could get a C proggy to call a shell script, but that would be slower,
|
|
possibly more interesting?
|
|
Fred.
|
|
--
|
|
Replied-to-by: DYLAN
|
|
|
|
19:35 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 265 (of 292, 25 more unread) in UNIX-HELP:
|
|
Date: Friday, 30 March, 1990 - 3:49 AM
|
|
From: DYLAN
|
|
To: FRED
|
|
Subject: cd...
|
|
In-Reply-To: 264, 261, 260, 259, 257, 256, 252
|
|
|
|
But that wouldn't work.
|
|
|
|
Dylan.
|
|
|
|
19:31 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 266 (of 292, 24 more unread) in UNIX-HELP:
|
|
Date: Friday, 30 March, 1990 - 10:21 AM
|
|
From: DISCO MAN
|
|
Subject: changing directory in a c program
|
|
|
|
The whole idea of changing the directory in a c program is so that
|
|
I can write for example
|
|
chdir("/user/compsci/cs_bsc/evansmp/application");
|
|
...
|
|
output = fopen("outfile");
|
|
input = fopen("infile");
|
|
rename ("infile","infile%");
|
|
|
|
without having to put the complete path name in every file reference,
|
|
and ensuring that the program will do what it should do whatever the
|
|
pwd of its parent process is.
|
|
|
|
Prehaps more useful is
|
|
#define APPLICATION_DIR "/usr/compsci/cs_bsc/evansmp/application"
|
|
...
|
|
chdir(APPLICATION_DIR);
|
|
|
|
--More [YD]-- 19:20 [UNIX-HELP] Reading (?
|
|
for help) N
|
|
|
|
Message 267 (of 292, 23 more unread) in UNIX-HELP:
|
|
Date: Wednesday, 4 April, 1990 - 9:13 PM
|
|
From: PC PLOD
|
|
Subject: re: cd.. cd.. cd.. cd.. cd.. cd.. cd.. cd.. ....
|
|
|
|
Have we all flogged 'cd' to death now PLEASE??
|
|
--
|
|
Replied-to-by: DYLAN
|
|
|
|
19:15 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 268 (of 292, 22 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 12:20 AM
|
|
From: DYLAN
|
|
To: PC PLOD
|
|
Subject: re: cd.. cd.. cd.. cd.. cd.. cd.. cd.. cd.. ....
|
|
In-Reply-To: 267
|
|
|
|
Well actually, we could go on at great length if you really wanted us to....
|
|
|
|
Dylan.
|
|
|
|
19:09 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 269 (of 292, 21 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 6:17 AM
|
|
From: DYLAN
|
|
Subject: lisp
|
|
|
|
I need a lisp interpreter which will compile + run on System V, specifically
|
|
a Xenix machine? Anyone got one.
|
|
|
|
Dylan.
|
|
--
|
|
Replied-to-by: LORRY
|
|
|
|
19:03 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 270 (of 292, 20 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 12:24 PM
|
|
From: LORRY
|
|
To: DYLAN
|
|
Subject: lisp
|
|
In-Reply-To: 269
|
|
|
|
Think there's one on Tardis but anyway, jpd could be the man to ask.
|
|
--
|
|
Replied-to-by: DYLAN
|
|
|
|
18:57 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 276 (of 292, 19 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 7:26 PM
|
|
From: DYLAN
|
|
To: LORRY
|
|
Subject: lisp
|
|
In-Reply-To: 270, 269
|
|
|
|
I already have, and am waiting in anticiaption of his answer sweetnes.
|
|
|
|
Dylan.
|
|
|
|
18:55 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 271 (of 292, 18 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 5:55 PM
|
|
From: CHRIS2
|
|
Subject: File creation
|
|
|
|
As a non Unix expert can anyone help me with this one?
|
|
|
|
I want to put something into .profile so that when I sign on a test will
|
|
be carried out to see if a certain file exists. If it doesn't then I want to
|
|
6create a new directory in /tmp/mysignon
|
|
--
|
|
Replied-to-by: CYBERMAN
|
|
--
|
|
Replied-to-by: BLADERUNNER
|
|
|
|
18:50 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 272 (of 292, 17 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 6:02 PM
|
|
From: CHRIS2
|
|
Subject: File creation
|
|
|
|
please e-mail your repiles regarding my previous fiule
|
|
creation question to C.Dennison@uk.ac.newcastle
|
|
|
|
Many thanks Chris2
|
|
|
|
18:48 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 273 (of 292, 16 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 6:15 PM
|
|
From: CYBERMAN
|
|
To: CHRIS2
|
|
Subject: File creation
|
|
In-Reply-To: 271
|
|
|
|
Try this
|
|
|
|
if [ -f file ]
|
|
then
|
|
mkdir /tmp/mysignon/whatever
|
|
fi
|
|
|
|
Or, if the file has to both exist and be non-zero in length
|
|
use
|
|
|
|
if [ -s file ]
|
|
|
|
Square brackets execute the command test, I think the above is more
|
|
readable, but you can also write these as below (see test manual page)
|
|
|
|
--More (85%) [YNDQ]--
|
|
if test -f file
|
|
then
|
|
....
|
|
|
|
Hope this helps,
|
|
|
|
--- Malcolm
|
|
|
|
18:44 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 274 (of 292, 15 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 6:48 PM
|
|
From: BLADERUNNER
|
|
To: CHRIS2
|
|
Subject: File creation
|
|
In-Reply-To: 271
|
|
|
|
Ummm..how about something like this:
|
|
|
|
if test -s FILEYOUWANTTESTED then
|
|
mkdir /tmp/mysigno
|
|
fi
|
|
|
|
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>BLADERUNNER>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
--
|
|
Replied-to-by: BLADERUNNER
|
|
|
|
18:29 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 275 (of 292, 14 more unread) in UNIX-HELP:
|
|
Date: Thursday, 5 April, 1990 - 6:51 PM
|
|
From: BLADERUNNER
|
|
To: BLADERUNNER
|
|
Subject: File creation
|
|
In-Reply-To: 274, 271
|
|
|
|
Whoops! Looks like Cyberman's already answered it!! :-)
|
|
|
|
18:25 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 278 (of 292, 13 more unread) in UNIX-HELP:
|
|
Date: Saturday, 7 April, 1990 - 6:54 PM
|
|
From: TANIA
|
|
To: OLORIN
|
|
Subject: background login
|
|
In-Reply-To: 233, 228, 223
|
|
|
|
hmm.. I think you're kinda getting mixed up over the way subshells exist in
|
|
unix if you're talking like that... there's no way in unix that a child
|
|
process can set the enviromnet (or anything else) of its parent (see `man tset`
|
|
for a quote like "if a process could set the environment of its parent, none of
|
|
this nonsense would be necessary in the first place")
|
|
|
|
whoever it was said about 'alias a alias' making all the lines using the alias
|
|
'a' go back to the start of the file -- uh, nono; the alias has been set up in
|
|
the shell process, hash tables and all that jazz; it doesnt need to go back
|
|
read the file in again. How could it re-read stdin, eh?
|
|
|
|
there's various things that make .cshrc initialisation slow; I can't remember
|
|
all the reasons I realised and cut down on in my .cshrc...
|
|
evaluating ~<username> is very slow, but ~ on its own is fast.
|
|
in tcsh, whenever you set path, it recreates its hash table (maybe in csh too)
|
|
so don't do
|
|
set path = ( /bin /usr/bin /usr/ucb /usr/local /gnu/bin )
|
|
set path = ( $path ~/bin/sun3 ~/bin/scripts /cs/share/bin )
|
|
set path = ( $path /more/funky/stuff /loadsa/paths/for/interesting/things )
|
|
... do it all in one line, escaping newlines.
|
|
also, if your path setup uses eg ../bin/`arch`/ or something several times, or
|
|
indeed if you use any program more than once to get the same result, evaluate
|
|
it once and put it in a variable.
|
|
keep checking it and cutting out anything you dont really use; I for one often
|
|
make up wierd and wonderful aliases to do complex tasks without needing any
|
|
further thought (what's that?) and then never use them again.
|
|
Put all the esoteric ones in a separate file and make an alias (gasp!) to
|
|
--More (83%) [YNDQ]--
|
|
source that file -- many logins are just short ones that don't need all that
|
|
trash (check printer queue; mail someone/check mail; whatever)
|
|
|
|
Er, kickoff time... see y'later.
|
|
|
|
Don't worry, be happy.
|
|
~Tania ----# Aaarrrggghhh what am I doing here anyway I've got a project to
|
|
finish!!!
|
|
Fish!
|
|
bye!
|
|
--
|
|
Replied-to-by: CYBERMAN
|
|
--
|
|
Replied-to-by: OLORIN
|
|
|
|
17:58 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 279 (of 292, 12 more unread) in UNIX-HELP:
|
|
Date: Saturday, 7 April, 1990 - 8:30 PM
|
|
From: CYBERMAN
|
|
To: TANIA
|
|
Subject: background login
|
|
In-Reply-To: 278, 233, 228, 223
|
|
|
|
Ssh startup is LOADS faster than csh, because you can get it to
|
|
declare aliases as extern, i.e. expanded when called the first time.
|
|
Means you can have as many wierd aliases as you like.
|
|
|
|
Doesnt help with csh though, does it..
|
|
|
|
Setting paths, i find it best to do it like thius..
|
|
|
|
set lpath = ( ~/bin /usr/local/bin ~/bin/X11 )
|
|
set path = ( . $lpath /usr/bin /usr/ucb /bin /etc /usr/etc )
|
|
|
|
Except thatI usually put . at the end
|
|
|
|
Also, if you replace less common aliases with scripts, startup is faster.
|
|
|
|
--More (83%) [YNDQ]--
|
|
The main problem with csh startup however, is its size... Its just too big.
|
|
|
|
If you can get it, try ssh, or a ksh
|
|
|
|
--- MAlcolm
|
|
|
|
17:48 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 280 (of 292, 11 more unread) in UNIX-HELP:
|
|
Date: Sunday, 8 April, 1990 - 4:24 PM
|
|
From: OLORIN
|
|
To: TANIA
|
|
Subject: background login
|
|
In-Reply-To: 278, 233, 228, 223
|
|
|
|
What I meant was to simulate alias with shell scripts . It tends to be a lot
|
|
more flexible than the brain-dead alias facilities of csh. Trouble is then
|
|
theres the delay of spawning another shell :-(
|
|
--
|
|
Replied-to-by: FIZZ
|
|
--
|
|
Replied-to-by: CYBERMAN
|
|
|
|
17:43 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 281 (of 292, 10 more unread) in UNIX-HELP:
|
|
Date: Sunday, 8 April, 1990 - 5:15 PM
|
|
From: FIZZ
|
|
To: OLORIN
|
|
Subject: background login
|
|
In-Reply-To: 280, 278, 233, 228, 223
|
|
|
|
> ...spawning another shell
|
|
|
|
I thought Unixy peeps always forked other processes... hohum! :-)
|
|
|
|
+F.
|
|
--
|
|
Replied-to-by: OLORIN
|
|
|
|
17:40 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 282 (of 292, 9 more unread) in UNIX-HELP:
|
|
Date: Sunday, 8 April, 1990 - 5:44 PM
|
|
From: OLORIN
|
|
To: FIZZ
|
|
Subject: background login
|
|
In-Reply-To: 281, 280, 278, 233, 228, 223
|
|
|
|
Well if you're getting picky :-)
|
|
fork()/exec() 'ing another shell . Happy now ?
|
|
--
|
|
Replied-to-by: FIZZ
|
|
|
|
17:37 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 283 (of 292, 8 more unread) in UNIX-HELP:
|
|
Date: Sunday, 8 April, 1990 - 7:41 PM
|
|
From: FIZZ
|
|
To: OLORIN
|
|
Subject: background login
|
|
In-Reply-To: 282, 281, 280, 278, 233, 228, 223
|
|
|
|
Yep, ta! :-)
|
|
|
|
Wouldn't like people to get the impression we used VMS now would we? :->
|
|
|
|
+F.
|
|
|
|
17:29 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 284 (of 292, 7 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 12:30 AM
|
|
From: CYBERMAN
|
|
To: OLORIN
|
|
Subject: background login
|
|
In-Reply-To: 280, 278, 233, 228, 223
|
|
|
|
If you make teh first line of your script
|
|
|
|
#!\bin\csh -f
|
|
|
|
(slashes should be forward ones, but that key isnt workking :-( )
|
|
|
|
It shouldd start csh without reading aliases etc, check the manual page
|
|
for csh options.
|
|
|
|
Better still, write your scripts in Bournne shell, as its smaller it'll
|
|
start faster - and for scripts its generally regarded as a better shell.
|
|
|
|
For Bourne shell startup use
|
|
|
|
#!\bin\sh
|
|
--More (89%) [YNDQ]--
|
|
|
|
as the first linne (same problem with slashes)
|
|
|
|
--- Malcolm
|
|
|
|
17:11 [UNIX-HELP] Reading (? for help) N
|
|
Checkpointing...
|
|
|
|
Message 286 (of 292, 6 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 8:03 PM
|
|
From: ALIEN
|
|
Subject: UNIX shells
|
|
|
|
can anyone give me a rundown of the various shells available for UNIX
|
|
and the (dis)/advantages of them?
|
|
|
|
Alien
|
|
--
|
|
Replied-to-by: KEI
|
|
|
|
17:01 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 287 (of 292, 5 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 10:15 PM
|
|
From: KEI
|
|
To: ALIEN
|
|
Subject: UNIX shells
|
|
In-Reply-To: 286
|
|
|
|
Okay, speaking as a dedicated VMS person, I'm probably the wrong person to
|
|
answer this, but here goes!! One of the earliest shells was the Bourne shell
|
|
(written by Bourne), which should be found in /bin (i.e. /bin/sh). This is the
|
|
standard shell (well, sort of). It is small, fast and limited (no command
|
|
recall, line editing or sttff like that). Next on the scene was the C shell
|
|
(/bin/csh) this is meant to have a c-like syntax, making it easy for C
|
|
programmers to write shell scripts. It has rudimentary line-editing, using
|
|
commands like !! to recall the previous command !a to recal the last command
|
|
st`rting with a and various more complicated stuff. A recent arrival (ish) is
|
|
the korn shell (/bin/ksh) this is big but offers lots of facilities. There is
|
|
line-editing using EMACS or vi keystrokes. Aliases are available in csh and
|
|
ksh, these enable you to alias (for example) x to be cat, so when you type x
|
|
the shell replaces it with cat which it then executes. That's an overview ...
|
|
the logout approaches!!
|
|
|
|
--More (83%) [YNDQ]--
|
|
A couple of other shells I have heard of but not used are vsh (a visual
|
|
shell)and a shell written by those nice people at the free software foundation
|
|
(GNU) which I think is called bash.
|
|
|
|
Ian
|
|
--
|
|
Replied-to-by: PEBBLE
|
|
|
|
16:38 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 288 (of 292, 4 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 10:28 PM
|
|
From: PEBBLE
|
|
To: KEI
|
|
Subject: UNIX shells
|
|
In-Reply-To: 287, 286
|
|
|
|
There's also one I've heard of called `ash', which is intended to run with
|
|
`atty' (an `alternative termininal driver', which does line-editing etc.).
|
|
|
|
Bash (the FSF's Bourne Again Shell) is sort of a greatest upper bound (!) of
|
|
/bin/sh and csh - it has a superset of sh syntax, line-editing a la emacs, and
|
|
csh's job control and history substitution.
|
|
|
|
I've also heard of tcsh, which is sort of a modified csh (as ksh is a modified
|
|
Bourne shell).
|
|
|
|
I think that's more than enough, don't you? :)
|
|
--
|
|
Replied-to-by: PSYCHO
|
|
|
|
16:33 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 289 (of 292, 3 more unread) in UNIX-HELP:
|
|
Date: Monday, 9 April, 1990 - 10:33 PM
|
|
From: PSYCHO
|
|
To: PEBBLE
|
|
Subject: UNIX shells
|
|
In-Reply-To: 288, 287, 286
|
|
|
|
It is enough after I mention ssh (available on tardis).... 8-)
|
|
|
|
psycho....
|
|
--
|
|
Replied-to-by: FORD PREFECT
|
|
|
|
16:28 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 290 (of 292, 2 more unread) in UNIX-HELP:
|
|
Date: Tuesday, 10 April, 1990 - 9:23 AM
|
|
From: FORD PREFECT
|
|
To: PSYCHO
|
|
Subject: UNIX shells
|
|
In-Reply-To: 289, 288, 287, 286
|
|
|
|
On the subject of ssh.. I just happen to have the Man page here in front of me!
|
|
|
|
NAME
|
|
ssh - a portable Unix shell
|
|
|
|
SYNOPSIS
|
|
ssh [ [-fP-]-bcefiklnrstuvxzBCDEFHIJKLMNPRSTUX ][ arg ...]
|
|
|
|
DESCRIPTION
|
|
Summary
|
|
|
|
Ssh is a shell originally based on the Bourne shell sh with additions
|
|
inspired from the C-shell csh and the Korn shell ksh.
|
|
|
|
Ssh is intended to be totally compatible with sh and the settings of
|
|
--More (71%) [YNDQ]--
|
|
various flags permits use of the additional features. In particular,
|
|
the -T flag acts as a toggle for switching between full
|
|
sh-compatibility and full ssh. etc....
|
|
|
|
I hope this is of some use!
|
|
|
|
Ford Prefect
|
|
|
|
16:18 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 291 (of 292, 1 more unread) in UNIX-HELP:
|
|
Date: Thursday, 19 April, 1990 - 5:27 PM
|
|
From: DISCO MAN
|
|
Subject: problem with bash
|
|
|
|
Does anyone know how to get bash, (GNU's Bourne Again Shell) to compile
|
|
on a Sequent Symetry S27. I can get it to work fine on a sun sparcstation,
|
|
but not on the sequent.
|
|
|
|
16:18 [UNIX-HELP] Reading (? for help) N
|
|
|
|
Message 292 (of 292) in UNIX-HELP:
|
|
Date: Friday, 20 April, 1990 - 7:43 PM
|
|
From: DARKANGEL
|
|
Subject: Inter Process Communication
|
|
|
|
Firstly, many thanks to Olorin for the socket information, but ...
|
|
while developing the socket-using program (and it's really getting hair-raising
|
|
now!) how can you safely exit, e.g. on an external request (kill process!)
|
|
dropping the socket you were using. Where I'm at the (Sequent Symmetry S29 I
|
|
think - running DYNIX something or other - great effects can be had from simple
|
|
calls to fork()!) system complains when my program keels over - I have to wait
|
|
a while for the 'Socket already in use' messages to stop!
|
|
|
|
DarkAngel!
|
|
|
|
16:17 [UNIX-HELP] Reading (? for help) X
|
|
|
|
===============================================================================
|
|
[Hackernet BBS,LEEDS,UK(0532)557739, 24hrs. Home of H-Net Hacking magazine]
|
|
|