I need to pass a character to a php
script in a bash script. I want to do this in a loop. it will start with '1' until '9' and than it will continue with 'A' to 'Z'. I've found that bash recognizes character's by their octal ASCII
code. I think the code will look like this:
while true
do
#There will be a second loop for character iteration here I suppose
php index.php char
#end of the second loop
done
*char
variables used above is the iterator and the parameter for the php
script
Thank you!
You can do this:
for char in 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
do
php index.php "$char"
done
No need to use the ASCII code here, a for
loop will do the trick:
for char in {{1..9},{A..Z}} ; do
php index.php $char
done