comparison .bashrc @ 0:65a56c0d1c1f

bolting the barn door...
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 18 Feb 2020 13:15:05 +0000
parents
children 5371599c0cfa
comparison
equal deleted inserted replaced
-1:000000000000 0:65a56c0d1c1f
1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5 . /etc/bashrc
6 fi
7
8 # Uncomment the following line if you don't like systemctl's auto-paging feature:
9 # export SYSTEMD_PAGER=
10
11 # User specific aliases and functions
12 module add gnu-parallel
13 export N1=rli4n35
14 export N2=rli6n35
15 export NN="$N1 $N2"
16
17 # Tools
18 function lss() {
19 /bin/ls -l "$@" | sort -nr -k 5,5
20 }
21
22 function sus() {
23 sort "$@" | uniq -c | sort -k1nr,1
24 }
25
26 function tot ()
27 {
28 awk '{sum+=$1} END {printf "%u\n",sum}'
29 }
30
31 btot ()
32 {
33 python3 -c 'import sys
34 n=0
35 for l in sys.stdin:
36 n+=int(l)
37 print(n)
38 '
39 }
40
41 function typecat ()
42 {
43 tt=$(type $1)
44 case $tt in
45 *\ is\ hashed\ *) cat $(echo $tt | cut -f 4 -d ' ' | tr -d '()') ;;
46 *\ is\ /*) cat $(echo $tt | cut -f 3 -d ' ' | tr -d '()') ;;
47 *) type $1 ;;
48 esac
49 }
50 export HISTSIZE=3000
51 export PYTHONPATH=$HOME/lib/python3.6/site-packages