Run command on linux server, but same command's not working on shell script

15 views Asked by At

I am trying to upload a file to HDFS using the hdfs dfs -put command.

When I directly input hdfs dfs -put 'filepath/filename' 'destination' on the Linux server, it executes immediately, and the file exists on HDFS.

However, when I write the exact same command in a shell script and execute the script, no error appears, but the file is not uploaded to HDFS. What should I check to resolve this?

I really can't figure out the reason.

0

There are 0 answers