New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Help Needed: Scripting
LivingSouL
Member
I'm a n00b on programming/scripting so if anyone can help me please, I'd appreciate it.
How do you output hex chars on shell script? My goal is 5 characters long and increments it up until the end.
00000
00001
. . .
. . .
0000A
...
0001F
thank you!
Comments
Kabayan:
Try this
max=39
for((i=0;i<=max;i++))
do
str=$(printf "%05x" $i)
echo $str
done
Just replace 39 with a very high value
salamat!
here's the output
./test: line 6: syntax error: unexpected end of file
oh my bad.. "done" is actually part of it.. Thanks!
Try
bash test
-
Or put a
#!/bin/bash on top of file
Nice code
woah.. cool.. thanks @jcaleb and @prae5