linux - bash if statement expected unary operator -
I'm trying to do something on the lines of
, if (regular file Continue
What have I so far
st1 = $ (-f "$ {ARRAY [$ i]}" ) If I am receiving the "expected error operator error"
Post-text "Itemprop =" text "> You do not need to create the intermediate st1
variable just use:
if [[! -f "$ {ARRAY [$ i]}" || -H "$ {ARRAY [$ i]}"]] ;; Your use of "$ {ARRAY [$ i]}" st1 = $ (-f "$ {ARRAY [$ i]}") is available "first
/ Code> is incorrect and the reason for the syntax error will be:
-f: command not found
because on the shell f
Think of it as a command name.
Comments
Post a Comment