User login

bash

bash "No such file or directory" error even though .bashrc has proper include path

bash "No such file or directory"

Every time I opened Terminal:

bash: /home/ben/.bashrc-agaric: No such file or directory

But my ~/.bashrc was clear of calling that file.

And source .bashrc produced no errors. So where was it still calling the old file path?

Answer:

sudo vi /etc/bash.bashrc

(On Ubuntu. The global bash file may be in other places also.)

Check to ensure at least one parameter passed in to bash script

bash script check for existence of any argument

if [ $# -ne 1 ]
then
echo "USAGE: scriptname arg1 arg2"
return
fi

Helper script for deploying Drupal sites in Agaric's system

This function ("agc" stands for "Agaric Git Clone") is in my ~.bashrc (actually, a ~.bashrc-agaric that is included in my .bashrc) and takes care of several steps I always have to look up anyway. I recently extended it to be able to start a new project as well as bringing down a local copy of an existing one. This relies on and provides the first steps for the Capistrano scripts for deploying Agaric sites primarily developed by Stefan.

File: 
File: 

Merge all text files in a folder into one file

concatenate all files in directory (GNU-Linux)

cat ls -rt > newfilename

Note the backticks.

Syndicate content