Skip to content

Instantly share code, notes, and snippets.

@nleiva
Created September 14, 2020 21:37
Show Gist options
  • Save nleiva/31fdd6418a9d986757ab753b939e48b3 to your computer and use it in GitHub Desktop.
Save nleiva/31fdd6418a9d986757ab753b939e48b3 to your computer and use it in GitHub Desktop.
#!/bin/bash
source $1
# Fail if time is not set or add a sane default
if [ -z "$time" ]; then
time=$(date --iso-8601=seconds)
fi
printf '{"Name": "%s", "Time": "%s"}' "$name" "$time" > $file
go run *.go $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment