I have a file with list of directories:
$ cat dirs.txt
/some/path
/other/path
/some/another/one
Current directory is /home/loom
$ echo $PWD
/home/loom
I would like to add $PWD to each row of dirs.txt like the following:
/home/loom/some/path
/home/loom/other/path
/home/loom/some/another/one
I unsuccessfully tried the command:
$ cat dirs.txt | awk '{print $PWD$1}'
/some/path/some/path
/other/path/other/path
/some/another/one/some/another/one
It just doubled each row. What command solves my problem?
I mean parametric answer, not cat dirs.txt | awk '{print "/home/loom" $1}'