Created
January 14, 2022 18:26
-
-
Save sminot/56b0b310fc034f8bf5304785f4308f3f to your computer and use it in GitHub Desktop.
Print the log file from a Nextflow task using its short hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
WORK_DIR="${1}" | |
# Input is the short task id prefix | |
TASK_PREFIX="${2}" | |
# Get the complete suffix | |
TASK_SUFFIX="$( aws s3 ls ${WORK_DIR}/${TASK_PREFIX} | sed 's/.* //' )" | |
# Assemble the complete task path | |
TASK_DIR="${WORK_DIR}/${TASK_PREFIX:0:2}/${TASK_SUFFIX}" | |
# Get the logs | |
aws s3 cp "${TASK_DIR}.command.log" - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment