Tag Info

New answers tagged

1

This error happens when you execute a 64-bit executable in a 32-bit operating system. The only thing you can do is find a 32-bit version of the software you want to execute. Find out what type of executable it is (example output): $ file /path/to/64-bit-executable /path/to/64-bit-executable: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically ...


0

It's invasive, but you can use the oldest debugging technique in the book: print stuff to mark where things are going wrong: sudo tee -a /etc/profile <<<'echo /etc/profile' sudo tee -a /etc/bash.bashrc <<<'echo /etc/bash.bashrc' tee -a ~/.profile <<<'echo ~/.profile' tee -a ~/.bashrc <<<'echo ~/.bashrc' tee -a ...


1

To find which commands bash runs on start-up and which file those commands came from, run: PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2 The output is lengthy but the source of the gibberish will hopefully be clear. Explanation: PS4='+$BASH_SOURCE> ' When creating an execution trace, bash will prepend every line with an expansion of ...


0

This is my preferred display: added in ~/.bashrc PS1='[\u@\h \W]\$ ' display: [user@hostname dirname]#


2

There is no bash builtin to add permanent aliases. Such aliases are created by adding them to a configuration file that is sourced by interactive shells, as you've done with .bashrc. But you might consider modifying your palias() implementation by making it put the aliases in a separate file. I think this may be considered an improvement, for five reasons: ...


1

I suggest (of course you don't have to) putting an eval "$_" after the echo command, so the alias is added right away, and a grep -Pq "alias $1" && return at the start, to make sure that (1) you don't have duplicate alias names, (2) aliases get defined right away instead of waiting for them to be re-sourced. If you want to get even more creative ...


1

The error messages look interesting. The lines bash: alias: =: not found that is: bash gives us the message that it's builtin command, alias, gave it the message "not found" for something named "=". Now, alias is involved, and there is a = in a place where it is mistaken for a command. For the = to be treated as a command, it must be a single word, with ...


2

Probably you defined these alias in .bashrc file: alias UIC = 'sudo openvpn --config ~/vpn/UIC-alopez78.ovpn' alias mat = 'cd /home/alexisblopez/MATLAB/R2014a/bin/' alias lab = './matlab' You should edit .bashrc and remove space before and after =: alias UIC='sudo openvpn --config ~/vpn/UIC-alopez78.ovpn' alias mat='cd ...


6

From man bash: If the ;; operator is used, no subsequent matches are attempted after the first pattern match. Using ;& in place of ;; causes execution to continue with the list associated with the next set of patterns. Using ;;& in place of ;; causes the shell to test the next pattern ...


1

The double semicolon indicates the end of the case branch. See help case command for details.


1

That is the end of a single item in your case-switch, see e.g.: bash-case-statement


18

You can use the icndb RESTful API: http://www.icndb.com/api/. Install the cowsay, recode and jshon packages: sudo apt-get install cowsay recode jshon Then just add the following lines to your .bashrc: if [ "$PS1" ]; then wget "http://api.icndb.com/jokes/random" -qO- | jshon -e value -e joke -u | recode html | cowsay -f tux fi Note: checking if ...



Top 50 recent answers are included