diff --git a/scripts/grab.sh b/scripts/grab.sh new file mode 100644 index 0000000..ecedda7 --- /dev/null +++ b/scripts/grab.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Define the function to run the scp command for a specific value of j +run_scp() { + # studio id + id=$1 + # version number + j=$2 + + # job prefix + job=hour-colors-20240303-${j} + # name of file (locally) + out=hour-a${j}.mp4 + # name of file (remotely) + input=colors/lightning_logs/version_0/a0.mp4 + scp ${id}@ssh.lightning.ai:/teamspace/jobs/${job}/work/${input} ${out} +} + +# Export the function so that it can be used by parallel +export -f run_scp + +# Run scp command in parallel with 2 threads for j in 1 and 2 +parallel -j 2 run_scp ::: {1..3}