-
Notifications
You must be signed in to change notification settings - Fork 0
Mitchells shell tips
umask 002PATH=$PATH:/gscratch/stergachislab/install_dir/smrtlink/smrtcmds/bin/
alias myq=$'squeue -u $(whoami) -o $\'%A\t%u\t%C\t%m\t%a\t%M\t%p\t%T\t%r\t%j\t%N\' --noconvert | column -t'For better history text completion in bash add the following to ~/.inputrc:
# Press up-arrow for previous matching command
"\e[A":history-search-backward
# Press down-arrow for next matching command
"\e[B":history-search-forwardsee for details: https://unix.stackexchange.com/questions/96510/search-for-a-previous-command-with-the-same-prefix-when-i-press-up-at-a-shell-pr
These options make it so that once there is an error in the bash script the script ends with an error status. It also errors if there are unset variables (-u).
#!/usr/bin/env bash
set -euo pipefail Want to only ssh in once per terminal, add this to a file called ~/.ssh/config to set up something called a controlmaster .
Host stergachis
HostName klone.hyak.uw.edu
User mvollger
controlmaster auto
controlpath /tmp/ssh-ster-%r@h:%p
ServerAliveInterval 60
ForwardAgent yes
modify your user name, and then type:
ssh stergachisand then all subsequent calls to
ssh stergachiswon’t require that you login as long as the first session is still open.
Lets say there are some subreads in /mmfs1/gscratch/stergachislab/data/... that you want to use in your project. Don't copy these files, instead use softlinks. e.g.
ln -s /mmfs1/gscratch/stergachislab/data/...subreads.bam /path/to/my/project/data/.
This puts a link to the file in a convenient place for you without copying all the data, and you can use these links like regular files with all your programs 😄 !
-
Starshipis a minimal, blazing fast, and extremely customizable prompt for any shell! Starship: Cross-Shell Prompt -
lsd, aliaslstolsdfor a pretty terminal -
fdan simpler/faster version offind -
ripgrep/rga faster version ofgrep - A whole lot more
first add this to your .bashrc
alias joblimit=$'squeue | grep -w R | grep ckpt | wc -l | awk \'{print "Running Jobs: "$1}\' && sacctmgr show assoc where account=ckpt format=GrpJobs | grep -P "\d+" | awk \'{print "Allowed Jobs: "$1}\''
then
$ joblimit
Running Jobs: 65
Allowed Jobs: 64