Can I add a command in bash that starts when I open it?

Dazed_75 lthielster at gmail.com
Sat Oct 25 08:25:04 MST 2008


On Sat, Oct 25, 2008 at 1:28 AM, der.hans <PLUGd at lufthans.com> wrote:
> Am 24. Okt, 2008 schwätzte Mike Hoy so:
>
>> I edited this file and put echo cat
>> /proc/acpi/thermal_zone/THRM/temperature >> .bashrc at the end of it.
>
> You put the echo command in your .bashrc?
>
> If so, move your .bashrc to some other name, for example:
>
> mv -i .bashrc .bashrc.horked
>
> You might need to run that as root if you can't login as you.
>
> You probably have lots of extra information at the end of your .bashrc
> file and they're causing your login to fail.
>
> ciao,
>
> der.hans
> --

Mike, the reason der Hans says this is that the "echo cat ... >>
.bashrc" was not meant to be put into the .bashrc file but rather as a
command to append the "cat /proc/acpi/thermal_zone/THRM/temperature"
line to .bashrc.  By putting the echo line into .bashrc, you append
the cat line every time .bashrc is used thereby borking/horking the
file.  So Hans is having you get that file out of the way so it can be
replaced or rebuilt.

-- 
Man is the only animal that laughs and weeps, for he is the only
animal that is struck with the difference between what things are and
what they ought to be.
  - William Hazlitt


More information about the PLUG-discuss mailing list