help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] pb with the use of Merge


From: Nat Goodspeed
Subject: Re: [h-e-w] pb with the use of Merge
Date: Sat, 05 May 2007 16:16:22 -0400

At 03:03 PM 5/4/2007, Eli Zaretskii wrote:

> In bash, I just did this:
>
> for i in original/*.jpg;do convert -resize 50% $i smaller/`basename $i`;done
>
> Try doing that in one line in cmd.

No problem:

   for %F in (original\*.jpg) do convert -resize 50% %F smaller\%~nxF

Sounds like the last time you looked at the half-baked MS equivalents
was a long time ago.  The latest (since W2K) versions of cmd are much
smarter than their old namesakes.

<way off topic>
  Sorry, couldn't resist.
It's true that new versions of cmd are much more powerful than ever before. They've tried to adopt many semantic features of the Bourne shell and its many descendants. The trouble is that rather than borrowing syntax as well, they've invented some truly astonishing kludges. I have a small bash script, a helper used by other scripts, that searches for the base of my current Subversion work area. It writes the pathname to standard output. Typical usage in a bash script:
cd "$(find-workarea)"
I recently had to write a .bat script (don't ask) in which I wanted to use the same helper. Yes, it certainly is *possible*. Here's what I had to write:
for /f "usebackq" %%w in (`bash find-workarea`) do cd %%w
  Easy. Obvious. Natural. ;-)
</way off topic>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]