I am trying to write a variable into a file and also use the variable as the name of the file itself. Any ideas?
EXAMPLE 1: Filename and content within that file should be "helloworld"
#/bin/bash
OUTPUT="helloworld"
echo $OUTPUT > ~/Desktop/directory/outputs/$OUTPUT.txt
EXAMPLE 2: Filename and content within file should be "hellokitty"
#/bin/bash
OUTPUT="hellokitty"
echo $OUTPUT > ~/Desktop/directory/outputs/$OUTPUT.txt