Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement