Hello,
Ok I've been typing in a bash script from a book and I successfully found some typos and got rid of them. Also, I got help earlier from here about for loops. So I've made progress but I'm stuck again.
I suppose my question is how do you debug a bash script. I have Fedora Core 3 running on a legacy machine, so no GUI just command line only. At the moment all I know is how to use VI. What other tools are good? For example, is there a tool that I can use to print out lines 53-56 from a script.
I remember tail from a course but that only did the lines at the end of a script.
I have checked the listing against the book and I'm getting
Code:
:command not found
:command not found
:command not found
:command not found
:command not found
:command not found
:command not found
:command not found
-bash: chok3: line 380: syntax error: unexpected end of file
It seems to be something to do with variable declarations having a comment # at the end.
How can I make these go away?
More importantly the later lines that instruct iptables are not being executed because iptables -L gives the default.
I think that I have a problem similar to a missing close quote but I can see none.
Do any of this make sense to you guys?
Regards,
Meadensi