#!/bin/bash
# Make a txt copy of any html files
for value in $1/*.html
do
if [[ $value == *.html ]]; then
cp $value $1/$( basename -s .html $value ).txt
fi
done
ERROR: cp: cannot stat '/.html': No such file or directory cp: failed to access 'index.html/.txt': Not a directory