shell - In Unix, how to create a file in a absolute path name -
my variable path1 contains value /home/folder . how can create new file named foo using absolute path name? path1="/home/folder" echo "hello web" > $path1/foo but code give me error. can 1 please tell me how can create file foo in specific location, using path name? in bash should write: path1="/home/folder"; echo "hello web" > $path1/foo or: export path1="/home/folder" echo "hello web" > $path1/foo notation used works in bash script.