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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Mike Hoy
Date:  
To: nathan, Main PLUG discussion list
Subject: Re: Can I add a command in bash that starts when I open it?
I edited this file and put echo cat
/proc/acpi/thermal_zone/THRM/temperature >> .bashrc at the end of it.
Then I noticed that each time I opened a command prompt it kept the
temperature reading from the last command prompt so after a while I
had several temperatures echo'ing out when I opened it. So I removed
the line and logged off. When I tried to log back in I got this
message:

Your session only lasted less then 10 seconds. If you have not logged
out yourself, this could mean that there is some installation problem
or that you may be out of diskspace. Try logging in with one of the
failsafe sessions to see if you can fix the problem.

View details (~/.xsession-errors file)

/etc/gdm/Xsession: Beginning session setup...
/etc/profile: Syntax error: "(" unexpected

I then CTRL ALT F1 and log in.

The temperature echoes out several times.

I did: sudo nano /etc/profile and looked for anything that doesn't
belong but it looks good. The last line in it says: umask 022 which
was there before I started messing around. Anything I can do to fix
this?

> Simple. Add that command to your .bashrc file. Some shells use .profile
> instead. Play around with that.
>
> echo cat /proc/acpi/thermal_zone/THRM/temperature >> .bashrc
>
> nathan
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>




--
Mike Hoy
Saguaro Sports
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss