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.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -