#!/bin/env bash set -e rm -rf std/ && mkdir -p std/ files=$(find ../std/ -type f -name "*.bruijn" -printf '%h\0%d\0%p\n' | sort -t '\0' -n | awk -F '\0' '{print $3}') links="" prefix="seeelefant" for file in $files; do name=$(cut -c8- <<<"$file") _prefix=$(cut -c8- <<<"$file" | sed -rn 's@^(.*)/.*$@\1@p') if ! [ "$prefix" = "$_prefix" ]; then prefix=$_prefix links="$links\n