LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices



Reply
 
Search this Thread
Old 02-04-2009, 10:33 AM   #1
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
Unhappy editing startup script of bash -".bashrc"


hiii , friends
i am using bash shell. i know about ".bashrc" file. It contains startup scripts. Recently by mistake i had written wrong path in that file.
after looking at startup message, i had deleted that wrong path.


Now my problem is .... it is displaying all the added startup programs !!
i.e. the programs i had edited to my startup of bash.
they are also not working

for every startup of my terminal the message is like this :

Code:
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview :
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview :
raju@linux-d6yt:~>
my .bashrc file contains this code :
Code:
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg

# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
# settings made here will also take effect in a login shell.
#
# NOTE: It is recommended to make language settings in ~/.profile rather than
# here, since multilingual X sessions would not work properly if LANG is over-
# ridden in every subshell.

# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :-)
#export EDITOR=/usr/bin/vim
#export EDITOR=/usr/bin/mcedit

# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server

# If you want to use a Palm device with Linux, uncomment the two lines below.
# For some (older) Palm Pilots, you might need to set a lower baud rate
# e.g. 57600 or 38400; lowest is 9600 (very slow!)
#
#export PILOTPORT=/dev/pilot
#export PILOTRATE=115200

test -s ~/.alias && . ~/.alias || true

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview  >>~/.bashrc

echo PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview 

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview  >>~/.bashrc

echo PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview 

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview : >>~/.bashrc

echo PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview :

PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview : >> ~/.bashrc

echo PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview :
 
Old 02-04-2009, 11:17 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,755
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
Each of these lines is causing the output you see.
Code:
echo PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview :
Delete these lines. Then delete all of these lines
Code:
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview  >>~/.bashrc
Then delete this line
Code:
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar
Keep this line
Code:
PATH=/usr/bin:/home/raju/bin:/usr/local/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/bin/unrar:/usr/bin/gwenview
Then add this line
Code:
export PATH
 
  


Reply

Tags
bashrc, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 6 03-21-2013 11:35 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 10:00 AM
learned "aliases", what are "functions" in .bashrc? learnfast Linux - Newbie 3 03-15-2005 05:24 AM
how to add "hdparm -c 1 -d 1 -k 1 /dev/hda" to startup script (as root)? jimothy05 Linux - Distributions 2 10-07-2004 08:32 AM


All times are GMT -5. The time now is 04:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration