This gives me an error that says too many arguments:
if [ $( file -b $i ) == "directory" ]
But when I tried this
name=$( file -b $i )
if [ name == "directory" ]
It seems to work just fine.
Can someone explain this or point out in the docs an explanation? I am new to bash but from the standpoint of other programming languages this doesn't make any sense.
 
                 
                 
                 
                 
                 
                 
                