Bash for loop
Hi again LQ,
My question arises from trying out something I found in another LQ thread. I use csplit to split up a large file and I get file xx01, xx02 and so on. I use a for loop to loop through the files. Code:
for f in "xx**" Code:
test xx01 test xx02 test xx03 ... Code:
test xx01 xx02 xx03 ... Richard |
This works for me.
Code:
for f in $(ls xx**); do echo "test $f"; done |
It's all in the quotes:
Code:
[mherring@mystical tst]$ ls |
Quote:
It works now. |
All times are GMT -5. The time now is 07:13 PM. |