Impostare scorciatoie in ubuntu - .scarsirc file¶

  1. Recarsi nella home cd
  2. Scaricare il file wget https://scarsi.web.cern.ch/.scarsirc
  3. Aggiungere la seguente stringa al file .bashrc: [ -f ~/.scarsirc ] && . ~/.scarsirc

Per editare il file .bashrc:

  • Aprirlo con un qualsiasi editor di testo, per esempio nano .bashrc e pastarla a mano
  • Per i più pigri: echo "[ -f ~/.scarsirc ] && . ~/.scarsirc" >> .bashrc

Prevent .bashrc to execute in non interactive shells (such as when scp)¶

Add at the very beginning of the file

# Prevent execution in non interactive shell, such as scp
# Source: https://unix.stackexchange.com/questions/154395/running-scp-when-bashrc-of-remote-machine-includes-source-command
[ -z "${PS1:-}" ] && return