#!/bin/bash # {{ ansible_managed }} # Usage: get-file-prefix $slug [talks.json] # You can also set the TALKS_JSON environment variable SLUG=$1 if [ -z "$TALKS_JSON" ]; then TALKS_JSON=${2:-~orga/current/talks.json} fi jq -r '.talks[] | select(.slug=="'$SLUG'")["file-prefix"]' < $TALKS_JSON