> As commands in shell scripts are only able to recognize hdfs directories
This is an incorrect assumption. The shell action will merely execute any
given script file (as normally executed from a process), and does not care
about what is within it.
Does your script fail with an error? If so, please post the error.