Thanks again, you almost nailed it but last question
Suppose it is about command pwd and the path is stored hard coded instead of using command, I mean
if I run
it prints output of the pwd command that is /home/user/Desktop/documents
But if the path is stored hard coded in the script like
Now if I run
it prints /home/user/Desktop/documents/
, it is perfect that's what I want but if I use $var in my script, it does not add the path in the file.
I am using
$ sed "s/^/$var /g" list.txt
but it does add the path at start of the every line in the file.
If I am not clear enough, please comment.