I'm trying to write multiple output from a script to their own file, with incremented filename.
INPUT="$1"
# while loop
while IFS= read -r -n1 char
do
# display one character at a time
echo "$char" > filename
done < "$INPUT"
this is what i did so far, although it doesn't have the incremental count. Since the script print one char at a time, i need it to be put in it's own file, with an incremental or alphanumeric filename, so there no overwriting of the files.
"$num"is defined/created some where?