#!/bin/bash

special_chars=(
\ 
\"
\'
\$
\\
\;
\&
$'\t'
$'\n'
$'\r'
)

# for each special character
for c in "${special_chars[@]}"
do
	# create a file with the special character in the middle
	touch "./foo${c}bar"
done

# show how md5sum treats files with special characters
echo "md5sum foo*"
md5sum foo*
echo ""


QUOTING_STYLES=(literal shell shell-always c escape locale clocale)

# for each quoting style
for q in "${QUOTING_STYLES[@]}"
do
	# ls the files to show how the quoting style treats the special characters
	echo "ls -1 --quoting-style="$q" foo*"
	ls -1 --quoting-style="$q" foo*
	echo ""
done

