Skip to content

Instantly share code, notes, and snippets.

@aofarrel
Created January 21, 2026 23:04
Show Gist options
  • Select an option

  • Save aofarrel/76f5e21f710dfbf1227362673a616a66 to your computer and use it in GitHub Desktop.

Select an option

Save aofarrel/76f5e21f710dfbf1227362673a616a66 to your computer and use it in GitHub Desktop.
WDL task that concatenates the Bee Movie script to itself 12 times
task create_test_file {
input {
Boolean you_like_jazz = true #!UnusedDeclaration
}
command <<<
curl "https://gist.githubusercontent.com/MattIPv4/045239bc27b16b2bcf7a3a9a4648c08a/raw/2411e31293a35f3e565f61e7490a806d4720ea7e/bee%2520movie%2520script" > beemovie.txt
tmp=$(mktemp)
cp beemovie.txt "$tmp"
ITER=1
# 12 iterations will create a ~200 MB file
while [ $ITER -le 12 ]
do
cat "$tmp" "$tmp" > "$tmp.new"
mv "$tmp.new" "$tmp"
ITER=$(( ITER + 1 ))
done
mv "$tmp" beehive.txt
>>>
runtime {
cpu: 2
disks: "local-disk " + 10 + " HDD"
docker: "ashedpotatoes/dropkick:0.0.2"
memory: "8 GB"
preemptible: 2
}
output {
File test_file = "beehive.txt"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment