#!/bin/bash if [[ $# -ne 1 ]]; then echo "Usage: $0 " exit 1 fi SEMVER="$1" # Update all *.toc files sed -i -E "s/^(## Version: ).*/\1$SEMVER/" ./*.toc echo "Updated all .toc files with version $SEMVER"