Somehow in the following script, value of $i
is not expanded on line 3. Any idea why?
for i in `cat test.txt`
do
for j in `find . -name $i`
do
echo $j
done
done
Somehow in the following script, value of $i
is not expanded on line 3. Any idea why?
for i in `cat test.txt`
do
for j in `find . -name $i`
do
echo $j
done
done
After you fix the line endings:
xargs --arg-file test.text -I % find . -name "%"
No need for nested loops.
for i in `cat test.txt | sed -e "s/\r//g"`; do find -name $i; done
big question: cygwin support sed?
or cygwin
d2u test.txt; for i in `cat test.txt`; do find -name $i; done
or linux
dos2unix test.txt; for i in `cat test.txt`; do find -name $i; done