Reputation: 57
do someone know how to make this in one line of code. I mean by that without save the output of the ls in temp.txt between
ls | cat $x > temp.txt while read line; do echo foo/$line; done < temp.txt
Upvotes: 0
Views: 43
Reputation: 50750
Use printf with a glob.
printf 'foo/%s\n' *
Upvotes: 1