This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# This scripts installs jq: http://stedolan.github.io/jq/ | |
JQ=/usr/bin/jq | |
curl https://stedolan.github.io/jq/download/linux64/jq > $JQ && chmod +x $JQ | |
ls -la $JQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
echo "before exec" | |
TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"} | |
LOGFILE=test.$(date "+$TIMESTAMP_FORMAT") | |
# Redirect stdout/stderr to tee to write the log file | |
exec 1> >( tee "${LOGFILE}" ) 2>&1 | |
echo "after exec" |