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

Thursday, May 22, 2014

Basic types of Unix shell






If that's not the case, next time you got a command that you're not sure
about (from a script for example), paste it to explainshell.com. It may
be quicker to learn shell this way.




Ref: http://unixhelp.ed.ac.uk/shell/oview2.html

Friday, April 4, 2014

C shell basic







The C Shell recognizes the following operators, in order of precedence.

     ()       - parenthesis - change order of evaluation
     -        - unary minus/negation
     ~        - one's complement
     !        - logical negation
     %        - remainder
     /        - divide
     *        - multiply
     -        - subtract
     +        - addition
     >>       - shift right
     <<       - shift left
     >        - greater than
     <        - less than
     >=       - greater than or equal
     <=       - less than or equal
     !=       - not equal to (strings)
     ==       - equal to (strings)
     &        - bitwise AND 
     ^        - bitwise exclusive OR
     |        - bitwise inclusive OR
     &&       - logical AND
     ||       - logical OR

Ref: 1 2



Wednesday, May 12, 2010

Colorize unix shell prompt




Color Prompts

BASH shell:
alias ll='/opt/sfw/bin/ls -althp --color=auto'

PATH=$PATH:/usr/local/new/aps2/MSC_R-14-1_U/bin:$HOME/workspace/doPERL:$HOME/bin

alias toolbox='toolbox-MSC_R-14 &'
alias goplex='cd /home/xviengu/workspace/doPLEX/'
alias goperl='cd /home/xviengu/workspace/doPERL/'
alias gos37='ssh xviengu@seasx037.rnd.as.sw.ericsson.se'
alias gos74='ssh xviengu@seasx074.rnd.as.sw.ericsson.se'

alias pm='pm.pl'
alias pb='pb.pl'
alias csrv='csrv.pl'
alias cpf='cpf.pl'

#alias ana='ana.pl'
#alias gen='gen.pl'
#alias com='com.pl'
#alias pb='pb.pl'

if [ $CLEARCASE_ROOT ]; then
    export PS1='\e[0;31m[\u@\e[1;32m\h \e[0;36m`basename $CLEARCASE_ROOT` \e[0;35m${PWD#${PWD%/*/*/*}/}]\\$ \e[m';
else
    export PS1='\e[0;31m[\u@\e[1;32m\h \e[0;35m${PWD#${PWD%/*/*/*}/}]\\$ \e[m';
fi

VIMRUNTIME=$HOME/.vim;
export VIMRUNTIME

alias vim='/home/xviengu/bin/vim'
alias ctags='/home/xviengu/bin/ctags'
alias cscope='/home/xviengu/bin/cscope'


CSCOPE_EDITOR=$HOME/bin/vim;
export CSCOPE_EDITOR

CSCOPE_DB=$HOME/cscope/cscope.out;
export CSCOPE_DB

VPATH=$HOME/cscope:$HOME:.
export VPATH




Labels