Skip to content

Instantly share code, notes, and snippets.

version 1.0
task untar {
input {
File archive
}
command <<<
mkdir untar
tar xf ~{archive} -C untar
find untar -type f > filelist.txt
@mschatz
mschatz / pdfmerge.sh
Created October 28, 2022 03:42 — forked from BeatHubmann/pdfmerge.sh
Batch merge PDF files Mac OS command line
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=_all-merged.pdf *.pdf
@mschatz
mschatz / tally.sh
Last active November 9, 2023 05:54
tally space by file extension
gsutil -u anvil-tool-development du gs://fc-47de7dae-e8e6-429c-b760-b4ba49136eee > t2t.list.txt
grep -v '/$' t2t.list.txt | awk '{split($2,a,"."); print a[length(a)], $1}' | grep -v 'gs:' | awk '{names[$1]++; sizes[$1]+=$2;} END{for (name in names) print name, names[name], sizes[name]}' | sort -nrk3 | head