Shell Scripting: Using a variable to define a path Shell Scripting: Using a variable to define a path shell shell

Shell Scripting: Using a variable to define a path


Don't use spaces...

(Incorrect)

SPTH = '/home/Foo/Documents/Programs/ShellScripts/Butler'

(Correct)

SPTH='/home/Foo/Documents/Programs/ShellScripts/Butler'


To add to the above correct answer :-For my case in shell, this code worked (working on sqoop)

ROOT_PATH="path/to/the/folder"--options-file  $ROOT_PATH/query.txt