I'm trying to do something along lines of
if (!regular file || symbolic link)
continue
What I have so far is
st1=$( -f "${ARRAY[$i]}" )
if [ "$st1" -eq 0 ]
but I'm getting "expected unary operator error"
if [[ -f $file ]] || [[ -L $file ]]?st1=$( -f "${ARRAY[$i]}" )doesn't make sense. The$( ... )construct requires a command between the parentheses.-fis not a command; it's an argument to thetest,[, or[[command. You should have gotten an error likebash: -f: command not found, notexpected unary operator; did you copy-and-paste your exact code?