if statement - Bash - syntax error near unexpected token `fi' -


  #! If [[$ # -q '0']] then var = if [[$ $ var] -q '0']] then do something else if [[$ # - Ek '1']] usage; Fi if [[$ # -im '2']] if [["" $ 1 "! = "-R"]] then use; If the Fi [["$ 2" = ~ some_pattern]] then echo some more. "Pattern is in an inappropriate format. Please enter it: correct_pattern, and try again" use 1fin to exit = "Usage: meta_script For the .sh -r correct_pattern reset, the R is used to manually pass parameters instead of using "exit 1 fi"  

by default When I run this script, I have an error:

  ./ meta_script.sh: Line 31: Unexpected The syntax error near the token `fi / meta_script.sh: line 31:` fi ' 

first if statement where I am checking that the number of parameter 1 So I had put a then , but I got the error just like the above, leaving except instead of fi . It's almost nothing that I have kept and where is it, I get these errors and when I remove it and remove them to fix it, then I get a second bunch of similar errors. Please help me fix this script. Thanks!


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -