comparison .bash_extras @ 3:6c772ae7fce2

for 2026
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 20 May 2026 16:51:56 +0100
parents fef95c7a391f
children 10dfd4feeaa0
comparison
equal deleted inserted replaced
2:345f8b12fd2f 3:6c772ae7fce2
1 # Sourced by .bashrc and singularity runscript 1 # General-purpose environment variables and utility functions
2 # Recommended for inclusion in ${HOME}/.bashrc via
3 # source /work/dc007/dc007/shared/.bash_extras
4 # Already sourced in singularity container _before_ bash is launched
5 # Note that $HOME (and therefore the meaning of ~ in paths) is
6 # set to $W in the singularity container for convenience, as it is
7 # assumed to be where you will spend most of your time
8
9 H=/home/dc007/dc007/${USER} # Only visible from login nodes
10 W=/work/dc007/dc007/${USER}
11
12 CCC=/work/dc007/shared/pod12/common_crawl
13 SHARED=/work/dc007/dc007/shared
14
15 PATH=$PATH:$HOME/.local/bin:$HOME/bin:$W/bin:$SHARED/bin
16
17 export H W CCC SHARED PATH
2 18
3 cu () 19 cu ()
4 { 20 {
5 cvs update "$@" | egrep -v '^\?' 21 cvs update "$@" | egrep -v '^\?'
6 } 22 }
44 sort "$@" | uniq -c | sort -k1nr,1 60 sort "$@" | uniq -c | sort -k1nr,1
45 } 61 }
46 62
47 uz () 63 uz ()
48 { 64 {
49 igzip -dc "$@" 65 igzip -dc "$@" # only works under sing
50 } 66 }
51 67
52 function tot () 68 function tot ()
53 { 69 {
54 awk '{sum+=$1} END {printf "%u\n",sum}' 70 awk '{sum+=$1} END {printf "%u\n",sum}'