Discussion:
is there a startup script?
(too old to reply)
Daniel L Newhouse
2021-03-25 21:15:15 UTC
Permalink
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Grant Taylor
2021-03-25 21:48:41 UTC
Permalink
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Are you asking about the original Bourne shell or about the newer Bash
shell?

I know that Bash has many different start up files that will be used for
various different things. It's non-trivial and depends on how it's started.
--
Grant. . . .
unix || die
Lewis
2021-03-25 21:50:17 UTC
Permalink
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
This seems a strange place to ask about t-shell. Do you, perhaps, mean
tcsh? If so, I seem to recall it uses the same files a csh (.cshrc, et
al) but I haven't run tcsh in many many years.
--
National Socialism is not Socialism, any more than the Black Panthers
were actually cats. @jearl
Michael F. Stemper
2021-03-26 17:30:06 UTC
Permalink
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.

Then, there is ~/.bashrc, which bash runs for non-login shells.

There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
--
Michael F. Stemper
If you take cranberries and stew them like applesauce they taste much
more like prunes than rhubarb does.
Daniel L Newhouse
2021-03-28 20:09:06 UTC
Permalink
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
<***@gmail.com> wrote:

Well, they don't have that in cygwin. I remember cygwin being a
little more flexible than it is. Cygwin needs to be based on
OpenSUSE. The only viable alternative would be Darwin.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Daniel L Newhouse
2021-03-28 20:12:58 UTC
Permalink
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
<***@gmail.com> wrote:

I remember cygwin being more fliexible. Basically, it needs to based
on Darwin. Which means it needs to be like a Macintosh.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Daniel L Newhouse
2021-03-28 20:16:15 UTC
Permalink
On Sun, 28 Mar 2021 15:12:58 -0500, Daniel L Newhouse
<***@gmail.com> wrote:

Maybe it should be OpenBSD to avoid the Macintosh association.
Post by Daniel L Newhouse
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
I remember cygwin being more fliexible. Basically, it needs to based
on Darwin. Which means it needs to be like a Macintosh.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Daniel L Newhouse
2021-03-28 21:24:29 UTC
Permalink
On Sun, 28 Mar 2021 15:16:15 -0500, Daniel L Newhouse
<***@gmail.com> wrote:

There's another reason to use OpenBSD instead of Darwin. The
nix-Darwin symbol looks like the devil.
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:12:58 -0500, Daniel L Newhouse
Maybe it should be OpenBSD to avoid the Macintosh association.
Post by Daniel L Newhouse
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
I remember cygwin being more fliexible. Basically, it needs to based
on Darwin. Which means it needs to be like a Macintosh.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Daniel L Newhouse
2021-03-29 00:00:25 UTC
Permalink
On Sun, 28 Mar 2021 16:24:29 -0500, Daniel L Newhouse
<***@gmail.com> wrote:

K, I was looking for the following syntax for cygwin
PS1 = "\s-\v\w"

On 4th thought, it should be minix.
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:16:15 -0500, Daniel L Newhouse
There's another reason to use OpenBSD instead of Darwin. The
nix-Darwin symbol looks like the devil.
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:12:58 -0500, Daniel L Newhouse
Maybe it should be OpenBSD to avoid the Macintosh association.
Post by Daniel L Newhouse
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
I remember cygwin being more fliexible. Basically, it needs to based
on Darwin. Which means it needs to be like a Macintosh.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Lewis
2021-03-29 03:09:30 UTC
Permalink
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:16:15 -0500, Daniel L Newhouse
There's another reason to use OpenBSD instead of Darwin. The
nix-Darwin symbol looks like the devil.
SPOOKY!

The BSD symbol has been a devil for... 40 years?
--
"Those people who think they know everything are a great annoyance to
those of us who do." - Isaac Asimov
Daniel L Newhouse
2021-05-27 00:45:49 UTC
Permalink
On Sun, 28 Mar 2021 16:24:29 -0500, Daniel L Newhouse
<***@gmail.com> wrote:

From the OReilly book the bash shell

One advantage of bash’s ability to look for either synonym is that you
can retain your .profile if you have been using the Bourne shell. If
you need to add bash-specific commands, you can put them in
.bash_profile followed by the command source .profile. When you log
in, all the bash-specific commands will be executed, and bash will
source .profile, executing the remaining commands. If you decide to
switch to using the Bourne shell you don’t have to modify your
existing files. A similar approach was intended for .bash_login and
the C shell .login, but due to differences in the basic syntax of the
shells, this is not a good idea. .bash_profile is read and executed
only by the login shell. If you start up a new shell (a subshell) by
typing bash on the command line, it will attempt to read commands from
the file .bashrc. This scheme allows you the flexibility to separate
startup commands needed at login time from those you might need when
you run a subshell. If you need to have the same commands run
regardless of whether it is a login shell or a subshell, you can just
use the source command from within .bash_profile to execute .bashrc.
If .bashrc doesn’t exist then no commands are executed when you start
up a subshell.

Cameron Newham. Learning the bash Shell (In a Nutshell (O'Reilly))
(pp. 89-90). O'Reilly Media. Kindle Edition.
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:16:15 -0500, Daniel L Newhouse
There's another reason to use OpenBSD instead of Darwin. The
nix-Darwin symbol looks like the devil.
Post by Daniel L Newhouse
On Sun, 28 Mar 2021 15:12:58 -0500, Daniel L Newhouse
Maybe it should be OpenBSD to avoid the Macintosh association.
Post by Daniel L Newhouse
On Fri, 26 Mar 2021 12:30:06 -0500, "Michael F. Stemper"
I remember cygwin being more fliexible. Basically, it needs to based
on Darwin. Which means it needs to be like a Macintosh.
Post by Michael F. Stemper
Post by Daniel L Newhouse
I'm looking through the OReilly book. I'm used to the t-shell. Does
this shell have a startup script?
Well, there is ~/.profile, which I mostly use for setting environment
variables. It's only run (as I understand it) for login shells. However,
if you're running in a windowing environment, other windows appear to
inherit all of those variables.
Then, there is ~/.bashrc, which bash runs for non-login shells.
There is also ~/.bash_aliases, which is used to set command aliases in
interactive use. My ~/.bashrc conditionally executes it (the condition
being if ~/.bash_aliases exists). I don't think that this is really
a fundamental part of the bash ecosystem.
Loading...