Unable to understand a line in .bashrc
I found the following code in one's .bashrc # Source global definitions [ -f /etc/bashrc ] && . /etc/bashrc It apparently caused my Bash duplicate a lot. What does the one-liner means? ...
I found the following code in one's .bashrc # Source global definitions [ -f /etc/bashrc ] && . /etc/bashrc It apparently caused my Bash duplicate a lot. What does the one-liner means? ...
I put the following unsuccessfully to my .bashrc shopt -s globstar I am trying to test the command in action by ls **/*.c and by comparing it to ls */*/*.c How can you enable globstar in Bash 4? ...
it seems that if i use alias ls='ls -F' inside of .bashrc on Mac OS X, then the newly created shell will not have that alias. I need to type bash again and that alias will be in effect. and if i log into linux on the hosting company, the .bashrc has a comment line that says: for non-login shell and .bash_profile has a comment fo...
it seems that we will put source ~/.bashrc in our .bash_profile anyway. So why not just use one file, say .bashrc ? ...
I'd like to create a setup on my local machine (Ubuntu GNOME) whereby the terminal window has a different background color depending on whether I'm logged in to my local machine or ssh'd into a remote machine. Is there a way to do this? ...
Passenger says: Ruby on Rails application could not be started ... Command 'exiftool' not found (MiniExiftool::Error) When I login with ssh and I type exiftool in any directory the command works properly. I have the follwing line in both .bash_profile and .bashrc export PATH=$PATH:$HOME/bin Is it possible that Rails (MiniExiftool pl...
I use Cygwin's bash shell (bash -i) daily for common tasks. In my .bashrc file, I have the following: history -rc bashcommands.history history Above the first prompt line, I see the list of history commands from bashcommands.history, so it looks like the history has been changed. However, if I now enter "history" at the prompt, it s...
I have GIT running on a Solaris server. From a windows machine I installed cygwin to try to clone a repository hosted on the server. I do the following: $ git clone username@server:project.git ksh: git-upload-pack: not found So I try $ ssh username@server echo \$PATH /usr/bin It seems like git is not in /usr/bin/ but in /usr/lo...
i have the following alias set in my .bashrc: alias la='ls -laG' but i would really like to issue a command thusly: la foo/bar i guess i have to write a shell script? or is there some xargs way? ...
Ok, maybe I'm doing something really stupid. I'm on OSX 10.6.1. I want to add mysql to my path, so I add the following to my .bashrc PATH = ${PATH}:/usr/local/mysql/bin export PATH upon running terminal, it doesn't work, which I expect, because .bash_profile is not loading .bashrc at the moment. but if I manually enter bash, i get ...
Hi all. I recently added these lines to my ~/.bashrc file to show the current branch if i'm in a git working folder, and it works nicely for that. However, what i've lost is that the current folder name used to be shown in the tab for the terminal i have open, and now it isn't: it always just says 'Terminal'. Can i get that back and s...
Hello StackOverflowers, If I make changes to .bashrc, how do I reload it without logging out and back in? I'm embarrassed that I don't know the answer to this question, since I do a fair amount of bash scripting. I'm also couldn't decide if I should post this on ServerFault, but since I do more scripting than sysadmin, I chose StackOve...
We are several persons using the same login id on Linux Box. I want to define my own aliases without interfering with anyone. In the .bashrc, I define a alias to my bash file defining my own aliases. alias luc=/full/path/to/my/def_alias_luc.sh The file /full/path/to/my/def_alias_luc.sh contains #!/bin/bash echo "" echo "Defining Lu...
I attempted to point the Cygwin installer to http://haskell.org/ghc/cygwin, but the installer was unable to find setup.ini.sig. If possible, how could I alternatively edit my .bashrc to reference an installation made using the setup binaries in C:/ghc/. ...
Hi, I have a Linux .bsh script, which I need to run on a Windows 7, and I’m having some difficulties with creating the script. I would like a script so I can run it in my cmd in windows or if the script could output to a file. The .bsh script looks as following: for ((r=0; r <$[0]; r++)) netcat localhost 4444 < $[1] $ done wait ...
I am writing a little install script for some software. All it does is unpack a target tar, and then i want to permanently set some environment variables - principally the location of the unpacked libs and updating $PATH. Do I need to programmatically edit the .bashrc file, adding the appropriate entries to the end for example, or is the...
Every night I go through the same process of checking failover systems for our T1's. I essentially go through the following process: Start the failover process. traceroute $server; Once I see it's failed over, I verify that connections work by SSHing into a server. ssh $server; Then once I see it works, I take it off of failover. ...
I've been advised to remove the return command from my bashrc file in order to allow Ruby Version Manager to function properly. Do I simply delete the return command, or do I replace it with some other command? I am hesitant to mess with my System-wide shell without some proper direction. But I would really like to get RVM working as it ...
Is it possible to source a .bshrc file from .cshrc in a non-interactive session? I'm asking because tcsh is our default shell at work and the .cshrc has to be used to set up the environment initially. However, I am not really familiar with the tcsh and I have my own set-up in bash, so right now I have the following lines at the end of my...
So every morning to boot up my server , I need to do the following tasks.. >> sunspot-solr stop >> sunspot-solr start >> script/console >> Organization.reindex >> Event.reindex >> Deal.reindex >> exit >> script/server Is there any way I can make a shortcut in my ~/.profile as an alias to perform all this for me without me typing it ev...