LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-21-2006, 03:20 PM   #1
fauna
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
clear won´t run on top of w on ~/.bash_profile


I´m trying to clear the screen right after login to avoid the output from my university´s system´s /etc/profile, by placing a clear on top of ~/bash_profile.
It doesn´t seem to execute.
I´ve tried clear, /usr/bin/clear, tput clear, and I´ve tried them on different spots of my ~/.bash_profile. Even tried placing it on ~/.bashrc.

Results show the w command, present on my ~/bash_profile as being the problem:

If I place clear after it, it clears, if I place clear before, it doesn´t.
If I remove w, it clears wherever I put it.

This doesn´t make any sense to me, and I want this w command being executed when I log in, on a clear screen.
Can any one help?


notes:
I tried the same thing on another computer, on RH 9, and it worked just fine on top of w.

The problem was found on FC4, kernel 2.6.17-1.2142_FC4smp, bash version 3.0 patch level 16, as bashbug-64 reports.
The problem was NOT found on RH9, kernel 2.4.20-8, bash version 2.05b, patch level 0, as bashbug reports.
 
Old 09-21-2006, 03:28 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
While I have heard of a ~/.bash_profile this is an unusual file name. Are you sure it isn't ~/.profile and/or ~/.bashrc? These two files are traditional and they are the file names used in most distros.

In any case the mail announcement and the message of the day display before the login scripts in your home directory execute.

Last edited by stress_junkie; 09-21-2006 at 03:47 PM.
 
Old 09-21-2006, 03:34 PM   #3
fauna
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
~/.bash_profile is default, just as ~/.profile ~/.bash_login ~/.bashrc
I could link you to wikipedia´s bash page saying that, but I can´t link anyone till I got 3 posts, it seems.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Run python script on .bash_profile warnetgm Linux - Newbie 32 09-08-2005 05:56 AM
Unix/Xenix programs won´t run in Linux trupillo Linux - Software 3 05-21-2004 12:13 PM
video lan player won`t run tony_stevens Linux - Software 1 05-14-2004 08:42 PM
suse9.0 videolan player won`t run tony_stevens Linux - Software 1 04-14-2004 12:02 PM
/.bash_profile setup to run java program mohapi Fedora 10 01-22-2004 07:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration