drivenmad / autocrack

Automatically exported from code.google.com/p/autocrack
1 stars 0 forks source link

Errors while executing script #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
rupin@rupin-laptop:~/Desktop$ sh autocrack3.3.sh auto
autocrack3.3.sh: 25: function: not found
rm: cannot remove `voicetempfile.txt': No such file or directory
autocrack3.3.sh: 28: Syntax error: "}" unexpected

Ubuntu 11.04
Kernel 2.6.38-8

Original issue reported on code.google.com by rupin.ch...@gmail.com on 17 Sep 2011 at 12:23

GoogleCodeExporter commented 9 years ago
Yes, i have noticed this error before and have simply avoided it by starting 
the script with ./ instead of sh - like so$ sudo ./autocrack3.3.sh auto. I have 
no idea why ./ works while sh doesn't. But i will look in to it and see what i 
can do about it. 

Original comment by esmith2...@gmail.com on 18 Sep 2011 at 12:00

GoogleCodeExporter commented 9 years ago
Okay, i think i understand the problem; under ubuntu invoking a script with 
"sh" uses a different interpreter called "dash". While invoking a script with 
"./" uses an interpreter called "bash" which is what this script was written 
for. From what i understand Dash is sh-compatible but lack support for some of 
the extra features found in Bash. If you like you can try invoking the script 
like so "sudo bash autocrack*.sh" and it should work, while if you do the same 
thing but with dash it will fail the same way as in your original post. I do 
not think this problem can be fixed without changing some system files. For the 
moment i will not try and fix this issue as it is not a defect with my script, 
and i don't think my script can be ran under Dash without be completely 
rewritten. 

Original comment by esmith2...@gmail.com on 18 Sep 2011 at 12:35

GoogleCodeExporter commented 9 years ago
That should not be a problem.Thanks for looking into it,As long as there is an 
alternative way of doing it, there should be no pressing need to fix it.

Original comment by rupin.ch...@gmail.com on 19 Sep 2011 at 4:16