Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Linux


Advertisements:










Software :: Get Bash To Reread The Bashrc File?


I have a quick question regarding the Bash shell and bashrc file. If I make some changes to my bashrc file, is there a way of making Bash reread the file without quiting and restarting my terminal emulator?


View 11 Replies (Posted: 11-08-2004, 09:03 AM)

Sponsored Links:

Related Forum Messages For Linux category:
General :: Can't Change Permission For Bash.bashrc File?
I tried following the example from here (http:url]......)Open up publicity.html for reading and writing by anyone.

Before: -rw-r--r-- publicity.html
Command: chmod og=rw publicity.html
After: -rw-rw-rw- publicity.html

Here's my terminal session:

username@ubuntu:/etc$ -rw-r--r-- bash.bashrc
-rw-r--r--: command not found
username@ubuntu:/etc$ chmod og=rw bash.bashrc[code]....

Posted: May 28 10 at 23:53

View 2 Replies!   View Related
Fedora :: Create A Shell Script File With Two Functions - Bash Scripting & /etc/bashrc
how come I can create a shell script file with two functions, I can execute the file, but when running declare -f, the functions are not on memory, and when invoking the function bash returns invalid. In the other hand, I can copy & paste the two functions at the end of my /etc/bashrc file.... then I can called the function by name.... and the commands within that function run on my session. here is a print of all my bash packets:

[Code]....

Does Fedora has restrictions on shell scripting? I haven't touch bash in seven years, so if things have change on it I'm behind on it, and sorry for my ignorance.

Posted: 6th October 2010, 01:09 AM

View 1 Replies!   View Related
Ubuntu :: Bashrc Script Occasionally Cases -bash - Too Many Arguments Error
I have a .bashrc script to shorten the length of my shell path and occasionally I get the error:

Code:

I've tracked it down to this line

Code:

But can't seem to find anything wrong with it.

Posted: March 24th, 2011

View 2 Replies!   View Related
Ubuntu Installation :: Where Is .bashrc File On 9.10
I am using Ubuntu 9.10. I was installing network simulator 2. After installation I get the following message.

Please put /home/administrator/Downloads/ns-allinone-2.34/bin:/home/administrator/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/administrator/Downloads/ns-allinone-2.34/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

[Code].....

My friend suggested that it is something to do with .bashrc file. I fund files like .bash.bashrc.

Posted: February 17th, 2010

View 4 Replies!   View Related
General :: Deleted .bashrc File Accidently
I accidently deleted my .bashrc file. I am a Debian user.Wat should i do??

Posted: 04-11-2010, 02:32 AM

View 7 Replies!   View Related
General :: Joining Two Commands In The .bashrc File?
attending class in the Redhat Academy Website. I was wondering how can you join the two commands of cd/usr & ls successfully in the .bashrc file?

Posted: 04-15-2011, 04:43 PM

View 10 Replies!   View Related
General :: Get Path Of Sourced Bashrc File?
I want to assign the path of a sourced sub.bashrc file to an environment variable. E.g. if I type (or execute) from a known relative location

$ source ../../someDir/sub.bashrc

the sub.bashrc should set a variable like

export MyOwnLocation=/home/user1/unknownlocation/someDir

The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.

Posted: 02-11-2011, 12:34 PM

View 6 Replies!   View Related
General :: Set Path For Different Software In The Bashrc File?
I have installed a software and set the variables in the .bashrc file to avoid setting them everytime I would like to run te software. Now I have installed a new software and would like to do the same thing in the .bashrc file.How can I add the path to the new software directory without affecting the first software path.

Posted: 08-24-2010, 06:26 AM

View 2 Replies!   View Related
General :: Use Environment Variables In The .bashrc File?
I am trying to include my directory /usr/sbin in it's serch path for executable files using an environment variable. Would the input be: PATH="/usr/sbin"? And also upon start up, my shell should create the PRINTER environment variable which should resolve to the word sales...would that input be: PRINTER="sales"? If someone could help me with these two questions,

Posted: 04-16-2011, 06:30 PM

View 3 Replies!   View Related
General :: Script After Putting The File In Bashrc?
I have a problem with my script. The problem is the system keeps rebooting after I put the directory file in .bashrc. The intentional for putting the file in .bashrc is to run the script automatically after login as root, I don know why is this happen. It was working fine for the first time without putting the file in bashrc. I could break the loop after hitting the "ESC" key. would it be the script problems?

Here is my script
count=20
while [ $count -gt 0 ];do
sleep 1
echo Press ESC to break the operation
((count=count-1))

[Code]...

Posted: 10-23-2010, 05:11 PM

View 11 Replies!   View Related
Fedora :: Add Path In .bashrc By Commenting Out Old Path And Adding New One - Command Source ~/bashrc
When I add some path in .bashrc by commenting out old path and adding new one like this:

#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY

After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.

Posted: 14th June 2011, 10:58 AM

View 10 Replies!   View Related
Red Hat / Fedora :: Edit In Bashrc File Now Cant Execute Commands?
recently I did some changes to my bashrc file the changes are as follows
export JAVA_HOME=/usr/java/jre<version>/bin/
export PATH=$PATH:/usr/java/jre<version>/bin

now I'm unable even login to the OS.

Posted: 05-30-2011

View 9 Replies!   View Related
CentOS 5 Server :: Can't Edit /etc/bashrc File / Make It Possible?
I am having a lil headache with it.
Some time ego i edited my /etc/bashrc file to add some aliases and colours for my ssh console.
Today i had a need to change few thing but for some reason i can't edit or delete this file any more.

I am logged as root.

rm bashrc
cannot remove, operation not permitted

chown and/or chmod fails as well with "not permitted" errors.

ls -Al | grep bashrc
-rw-r--r-- 1 root root 2514 mar 31 13:05 bashrc

Any ideas what's going on?

Posted: 2010/4/20 9:26

View 2 Replies!   View Related
General :: Modify .bashrc File To Change The HISTSIZE?
If I want to modify my .bashrc file to change the HISTSIZE would the following command be for example; HISTSIZE=200? And if I want to change the DEBUG_LEVEL to 8 would the following command be; DEBUG_LEVEL=8?

Posted: 04-27-2011, 04:13 PM

View 3 Replies!   View Related
Ubuntu :: .Bashrc File - General Guide To Customizing It?
I want to play around my .bashrc file, but I can't seem to find a general guide to customizing it. I just want a guide that will show me examples and explain them in-depth.

Does anyone where to find one?

Posted: March 3rd, 2011

View 2 Replies!   View Related
General :: .bashrc File Adds A Couple Of Tens Of Spaces To The Prompt?
I got myself a .bashrc file off the net. I checked it beforehand, didn't detect anything bad about it. One thing that's odd about it, is that several spaces are added to the terminal command line.Screenshot:Those spaces are not put there by me. The file can be found here: [URL]..

Posted: Sep 3 10 at 7:23

View 3 Replies!   View Related
Fedora :: Gparted - Kernel Unable To Reread Partition Table On Disks
When I start gparted, to see if I can add extra harddisk where all my data is, I get the next error:

Code:
[root# gparted
libparted : 1.9.0

The kernel was unable to re-read the partition table on /dev/sda (Device or resource busy). This means Linux won't know anything about the modifications you made until you reboot. You should reboot your computer before doing anything with /dev/sda. I can start fedora 12 x64 amd whitout any problem. My partition layout on a single disk (80 gb sata maxtor) for the system is:
Code:
/
/home
swap

When I try to mount one of the extra disks (samsung spinpoint 1 tb, I have 4) I get to next error:
Code:
root# mount /dev/sdb1 /media/sdb1
mount: you must specify the filesystem type

If I add the option with the filesystem I get:
Code:
root# mount -t ext3 /dev/sdb1 /media/sdb1
mount: special device /dev/sdb1 does not exist

In gparted, when I select just a flag option, and deselect, press ok, the disk is forced to be reread by the program. After that I can also mount it. When I use any of the programs linked in this post, I am able to mount the disks whitout any problem. Except after a reboot, I get the same problem. SO whit each reboot, or poweroff, I need to do a re-read of the disks. The system is fedora 12 x64 for amd, installed from a live cd, the rest whit yums groupinstall, the latest kernel.

Posted: 01-22-2010, 06:27 AM

View 6 Replies!   View Related
OpenSUSE :: How To "source Bashrc" - Get An Error File Or Directory Not Found
in order to install OpenFOAM, I need to

> source ~/.bashrc

but I get an error file or directory not found...

Posted: 12-Jun-2010 09:04

View 6 Replies!   View Related
General :: Write A Literal Bash Command In A Bash File?
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

Posted: 11-29-2010, 06:41 AM

View 6 Replies!   View Related
Ubuntu :: Set The Bash_history Size When Using The .bashrc File And Setting The "HISTSIZE=9000" Doesn't Work?
How do you set the bash_history size when using the .bashrc file and setting the "HISTSIZE=9000" doesn't work?

Posted: June 18th, 2010

View 9 Replies!   View Related
Ubuntu :: Tell Kernel To Reread Partition Table While One Partition Mounted
Is there a program that will reread the partition table and update the kernel even if one of the unmodified partitions is mounted? I installed my system on one partition, then I added another with free space. Now I want to format the second partition, but the kernel doesn't know about it yet. I tried sfdisk -R /dev/sda, but it refuses while the root partition is mounted. Is there anyway I can avoid rebooting?

Posted: February 5th, 2010

View 2 Replies!   View Related
Programming :: Bash File Comparing - Report How Many Matching Words My Main File ?
I have been messing with diff and grep for 2 days now without result

I am trying to match a file consisting of words to many separate other wordfiles in a specific directory. one by one.

What i want the script to do is to report how many matching words my main file has with every file in the directory, each in turn

setup:

Each of em are plain text files with 1 word per line

Output should be something like:

SCRIPT REPORT:

Posted: 06-09-2009, 01:54 PM

View 8 Replies!   View Related
Ubuntu :: Help With Bin File - Error Message - Bash - /hldsupdatetool.bin - No Such File Or Directory
I am new to Linux and I wanted to setup a dedicated game server on my notebook.

I've installed Ubuntu 9.04. I than created a directory named /home/phlex/kfserver. I downloaded the application binary from Steam. I changed the file permission with chmod +x hldsupdatetool.bin and now the file attributes are -rwxr-xr-x.

The problem is when I try to run the binary file. If I type ./hldsupdatetool.bin I get an error message "-bash: ./hldsupdatetool.bin: No such file or directory. It seems the OS can't find the file. I've downloaded the file several times thinking it may have been corrupt but it's not. I can delete the file, I can rename it and so the file is there. Sometimes Linux can be aggravating to use.

Posted: 06-09-2009

View 7 Replies!   View Related
General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?
I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

Posted: 05-11-2011, 10:32 PM

View 7 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved