Why does the following here document throw error instead of creating ~/Desktop/test.sh
?
sed: /first_names.txt: No such file or directory
cat << EOF > ~/Desktop/test.sh
#! /bin/bash
set -e
first_name=`sed "$(jot -r 1 1 2048)q;d" $dirname/first_names.txt | sed -e 's/[^a-zA-Z]//g'`
echo #first_name
EOF