while
read -r line
do
readlink -f $line > a.txt
done < $1
I have a file which contains 30 symbolic destination pathnames passed by $1. I want to read this file line by line and wants to save ls results of each path in a file a.txt. The problem coming is that its only taking last path name mentioned in $1. Its ignoring upper 29 lines. Why?
Change
to
https://serverfault.com/a/196735