Simple bash script; what's wrong with this syntax? -
I am reading the Bash script tutorial and it seems like this should work, but I'm clearly missing something Is:
isframecount = 0 francacount = 0 while p is read; If ["$ isframecount" -eq 0] then resonance $ p $ isframecount = 1 second echo "frame count" echo $ p $ isframecount = 0 complete
When I try to run above, "Command not found errors"; Any indicators?
Look for those spaces where they give importance and where should not be. In this case, if ["$ isframecount" -eq 0]
should be if ["$ isframecount" -q 0]
( [[/ /> and Before
]
).
The reason for this is that [
is actually the name of a program ... see itself .. type ls / bin / [
.. Now, if there is no room, then bash, ["0"
or something like that will appear for a similar program, which is most certainly not present in your path.
Then, in the opposite position ... the assignment in the variable should have no place =
. Then there should be $ isframecount = 1
isframecount = 1
. Note that I also removed the dollar sign, which is the way to go.
Comments
Post a Comment