home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!boulder!hamlet!drew
- From: drew@hamlet.cs.colorado.edu (Drew Eckhardt)
- Subject: Re: New questions (was: Help a linux newcomer please)
- Message-ID: <1992Jul30.231400.17194@colorado.edu>
- Sender: news@colorado.edu (The Daily Planet)
- Nntp-Posting-Host: hamlet.cs.colorado.edu
- Organization: University of Colorado at Boulder
- References: <1992Jul30.213310.28841@zip.eecs.umich.edu>
- Date: Thu, 30 Jul 1992 23:14:00 GMT
- Lines: 63
-
- In article <1992Jul30.213310.28841@zip.eecs.umich.edu> monkey@z.eecs.umich.edu (Xinbing Liu) writes:
- >Thanks to all who sent me email about my questions. Most are very helpful. A
- >few said all the answers were in FAQ. I disagree. I did read thru FAQ. But
- >nowhere in FAQ mentions where to get the command 'ln' which is needed for the
- >mtools to work. And I did not find in FAQ how to setup new accounts.
- >Anyway, now I've got mtools to work, and I can avoid the long and tedious
- >process of rawriting to floppies. Now I have new questions:
- >
- >1. How do I set new path? In unix I do "set path = ($path /mypath)", but
- >this does not seem to work here.
- >
- >2. How do I change the prompt? Again in unix it's "set prompt="myprompt" ",
- >and this does not work either.
-
- Answer : This is unix, or as close as we'll get without a USL lawsuit =8^)
-
- You're just used to c-shell and its derivatives,
- rather than Bourne shell (/bin/sh) and its kin. Either get a csh for
- Linux (ie, tcsh) and do what you always do, or use the Bourne shell syntax,
- which is to say variable=value, and then export the result for environment
- variables (as oposed to shell variables).
-
- Ie :
-
- PATH=${PATH}:/foo
- export PATH
-
- would add /foo to the default path.
-
- Under Bourne shells, the prompts are set with
- PS1 and PS2.
-
- PS1 sets the "top level" promt, ie what you see at the command line, ie
- PS1=foo:
-
- Will give me a prompt like
-
- foo:
-
- PS2 sets what you see if you've done something to get yourself a second
- level prompt, ie not closing some sort of quote or control structure,
- or by using \ line continuation.
-
- So, if PS1 = "foo: ", and PS2="bar: ", I could have a session that looks like
- this :
-
- foo: I=10
- foo: while [ $I -gt 0 ]; do
- bar: echo $I
- bar: I=`
- bar: expr $I - 1
- bar: `
- bar: done
- 10
- 9
- 8
- ...
- foo:
-
- Whizzy Bourne-like shells like gnu BASH (Bourne Again SHell), zsh, etc
- have special escapes that can be embedded in the path that expand to
- the current path, execute some command, etc. Read the manual
- for your Bourne shell.
-