Comments welcome.
A command line DO?
If you don't like the default line separator, ";", specify your own:
The tail of the DO command must be in `backticks`, but ^k will get around that (at least in many cases):
Other things inside the `command` should be safe (?):
There's no exotic technology at work here. CDO writes a batch file, executes it, and deletes it. As I said, comments welcome.
A command line DO?
Code:
v:\> cdo `i=1 to 2 ; do j=1 to 2 ; echos %i & echo %j ; enddo ; enddo`
11
12
21
22
Code:
v:\> cdo /! `i=1 to 2 ! do j=1 to 2 ! echos %i & echo %j ! enddo ! enddo`
11
12
21
22
Code:
v:\> cdo `i=1 to 2 ; do j=1 to 2 ; echos %i^k ^k & echo %j ; enddo ; enddo`
1 1
1 2
2 1
2 2
Code:
v:\> cdo `f in *.zip ; echo %f %@filesize["%f"] ; enddo`
4console.zip 5543374
4utils.zip 53817
a b.zip 119
gcolon.zip 5195737
ipv4.zip 404824
jlc.zip 123
jpnews.zip 14501646