my_runs.sh
The snippet can be accessed without any authentication.
Authored by
Will Holtz
Usage: my_runs.sh [jaws_user_id]
jaws_user_id defaults to $USER
Lists all JAWS run_ids in the default team output directory that were submitted by the user.
If you want to clean up all your runs, you can cd
to your default team's output directory and run rm -rf $(my_runs.sh)
my_runs.sh 715 B
#!/bin/bash
# Usage: my_runs.sh [jaws_user_id]
# jaws_user_id defaults to $USER
#
# Lists all JAWS run_ids in the default team output directory that were
# submitted by the user
#
set -euo pipefail
if [ "$JGI" = "true" ]; then
site=dori
jaws() { apptainer --silent run docker://doejgi/jaws-client:latest jaws "$@"; }
else
site=perlmutter
jaws() { shifter --module=none --entrypoint --image=doejgi/jaws-client:latest jaws "$@"; }
fi
team="$(grep default_team ~/jaws.conf | tr -d ' ' | cut -f2 -d=)"
out_dir="$(jaws teams get-site "$team" "$site" | tr -d '"')"
(
cd "$out_dir" || exit 1
for d in *; do
jaws status --verbose "$d" \
| jq "select(.user_id == \"${1:-$USER}\")| .id"
done
)
Please register or sign in to comment