In Windows DOS, I can use the
for command to massively increase productivity and performs zillions of things at once. In PowerShell, its even better. On Linux, I struggle.
How would I make a batch of soft-links to some folders on another drive?
ln -s 2013-02-* it does something totally nuts and makes links in a random folder.
So I am trying to use command-substitution but testing with
echo first, the problem is that
echo 'prepend/'`ls /drive/ -1`
Only prepends the preprend/ string to the first entry. This tells me that although I got command-substitution working with a remove command once, it doesn't work the way I thought (producing a single command for each ls result).
I'm back to needing a for loop. How do I do "foreach $row in (ls -1) do (something)"?