|
Home > Archive > Unix Shell > November 2006 > characters that define each shell?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
characters that define each shell?
|
|
| paintedjazz@gmail.com 2006-11-22, 1:39 am |
| I regularly use the Bourne Shell and Bash for scripts and the Bash and
the C Shell at the command line
with the Bash on OSX and the Bourne Shell and C Shell on Solaris. I
don't regularly use Zsh
but I may someday.
For obvious reasons, I have a database of unix commands which I limit
to 80 characters.
Thus, the 80 characters must be used to give an example and also try to
explain
what's being done or accomplished.
Since many of the commands are shell-specific
and some are root-specific and some are OS-specific, it's not always so
easy.
Clearly, the C Shell is the easiest by just including the percent sign
at the beginning of the line
(as if the prompt). Similarly, I have used '$' as both the root prompt
and the Bourne Shell prompt.
Zsh would be easy since I could get away with 'Z$' but what about the
difference between
the Bourne Shell and the Bash -- 'B$' would not work. Any ideas or
thoughts?
| |
| Janis Papanagnou 2006-11-22, 7:27 am |
| paintedjazz@gmail.com wrote:
> I regularly use the Bourne Shell and Bash for scripts and the Bash and
> the C Shell at the command line
> with the Bash on OSX and the Bourne Shell and C Shell on Solaris. I
> don't regularly use Zsh
> but I may someday.
>
> For obvious reasons, I have a database of unix commands which I limit
> to 80 characters.
> Thus, the 80 characters must be used to give an example and also try to
> explain
> what's being done or accomplished.
What has that to do with your question below?
> Since many of the commands are shell-specific
> and some are root-specific and some are OS-specific, it's not always so
> easy.
> Clearly, the C Shell is the easiest by just including the percent sign
> at the beginning of the line
> (as if the prompt). Similarly, I have used '$' as both the root prompt
> and the Bourne Shell prompt.
> Zsh would be easy since I could get away with 'Z$' but what about the
> difference between
> the Bourne Shell and the Bash -- 'B$' would not work. Any ideas or
> thoughts?
You want to adjust your prompt specific for your shell and are looking
for a naming convention? I've seen something like that helpful...
(sh)> ls -l # POSIX shell
(bsh)> ls -l # bourne shell
(ksh)> ls -l
(zsh)> ls -l
(bash)> ls -l
Operating under user root may be indicated by using a # instead of >...
(sh)# ls -l
Janis
| |
| PDreyer 2006-11-22, 7:27 am |
|
On Nov 22, 11:22 am, Janis Papanagnou <Janis_Papanag...@hotmail.com>
wrote:
> paintedj...@gmail.com wrote:
--- snip, snip ---
> for a naming convention? I've seen something like that helpful...
>
> (sh)> ls -l # POSIX shell
> (bsh)> ls -l # bourne shell
> (ksh)> ls -l
> (zsh)> ls -l
> (bash)> ls -l
>
> Operating under user root may be indicated by using a # instead of >...
>
> (sh)# ls -l
>
> Janis
Be careful with a > in the command prompt. If you accidentally copy and
paste the whole line you can clobber your files e.g. when you copy and
paste the below line
(bash)> /mydir/myscript
|
|
|
|
|