I want to make a program which will create files named as characters from the ASCII table. So 128 files from 1 to 127
I did something like this:
#!/bin/bash
temp=0;
for (( x=0; $x <= 177; x++ )) ; do
temp=$((temp+1))
if [ "$temp" = 8 ]; then
temp=$((0))
x=$((x+3))
fi
echo "$x"
`touch $'\"$x"'`
done
I know that it's written very weirdly, but what this program does is:
counting from 0 to 127 in oct (so from 0 to 177oct). The problem is that touch $'\"$x"'
doesn't work properly.
Although touch $'\101'
will make a file named "A".
Can anybody help me?