This are my notes in the fields of computer science and technology. Everything is written with ABSOLUTE NO WARRANTY of fitness for any purpose. Of course, feel free to comment anything.

Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

Thursday, December 31, 2009

ssh autocompletion in tcsh

I wrote the following for my .tcshrc to get some autocompletion for ssh.
set hostlist=(`cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | cut -f 1 -d ',' | uniq`)
complete ssh 'p/1/$hostlist/' 'p/2/c/'

Friday, November 7, 2008

Thursday, October 11, 2007

bash startup

In interactive mode bash executes some startup scripts. First thing to know is if it is a login shell or not a login shell: 

* login shell: (executes more things)
(1) general settings for all users are in: /etc/profile
(2) personal settins may be in: (first one readable)
~/.bash_profile
~/.bash_login
~/.profile
(3) before logout: ~/.bash_logout

* non-login: 
>bash => ~/.bashrc
>bash --norc => nothing
>bash --rcfile filename => specify another rc file

About Me

My photo
Hamburg, Hamburg, Germany
Former molecular biologist and web developer (Rails) and currently research scientist in bioinformatics.