This file contains 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 | |
# create an exclusive temp dir | |
# allow bash-isms | |
# b.kenyon.w@gmail.com | |
# If you don't need to retain the temp files after execution, and you reliably | |
# clean up on exit with a trap, and you only need to worry about concurrent | |
# instances, then you can just use $$ cheaper instead of this "until mkdir" loop. | |
# Comment this out to retain the temp files after execution (logging, debugging) |
This file contains 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 | |
# HTTP web service implemented in socat + bash | |
# Usage: socat -T 1 -d -d tcp-l:8080,reuseaddr,fork,crlf exec:./http_server.sh | |
# Purpose: Provide an HTTP server that displays the current server date, | |
# to validate the artifact structure and play with it. | |
# Note: socat crlf option is translating all our \n to \r\n on output. | |
http_version="1.0" | |
declare -a _http_responses=( |
NewerOlder