Bash script debugging issue
I am having difficulties debugging this bash
script for setting EQ presets in MPlayer. (Script Source) In Geany I have used set -x to see output. Currently working on getting bashdb installed. :study: Any feedback or help appreciated. Code:
+ equalizer=( 0 0 0 0 0 0 0 0 0 0 ) Code:
#!/bin/bash |
Hi,
After myfile='mktemp' there's a {, but no function is declared. Should this block be a function? Hope this helps. |
There are a bunch of errors:
Code:
myfile='mktemp' Code:
while read l $myfile Code:
while read f /dev/null 2>&1 Code:
if [ $? -ne 0 ] ; then 'if' without 'fi' (or I don't understand the meaning of &fi, but I have never seen it before, and if it is possible to do such things, it is obfuscated code at best and I don't see any reason to use that here) There might be more errors, but I am only a human being, not a script interpreter. Have also a look at the docs, see my signature. It is easier to read if you indent your code. jlinkels |
Thanks for the feedback.
I will take a look @ the recommended suggestions. Also why would someone post a script that doesn't work. :confused: _ |
Quote:
Seriously though, probably the user had posted inadvertently an old version of his script. jlinkels |
All times are GMT -5. The time now is 04:46 PM. |