SHARE
TWEET

Untitled

a guest Jun 16th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Shortcut for going to work directories
  2. # Usage: gw <workdir pattern>
  3. # Replace the work directory below as needed
  4. # Where workdir pattern is something like "ab/afedeu"
  5. function gw {
  6.         path=`ls --color=none -d /path/to/work/directory/$1*`
  7.         cd $path
  8. }
  9.  
  10. # sq squeue alternative
  11. # Outputs more complete information about jobs including the work directory
  12. function sq() {
  13.     squeue --user `whoami` --format='%.18i %50j %10u %.10C %m %20J %M %.2t %n %R %Z' | awk -v OFS='\t' '{ match($10, /([a-f0-9]{2}\/[a-f0-9]{6})/, arr); print $1, $2, $3, $4, $5, $6, $7, $8, $9, arr[1] }'
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top