[geeks] Nerdy scripting help...

Lionel Peterson lionel4287 at gmail.com
Fri Oct 15 10:30:20 CDT 2010


I realize you may already have a suitable answer, but i just wanted to throw
out Microsoft's Unix Services for Windows - it's a feature on Windows Server
2008 (was a for fee product, then a free product, now it is part of the
OS)...


Just an arrow you might want in your quiver.

Lionel

On Oct 13, 2010, at 5:15 PM, "Jonathan J. M. Katz" <jon at jonworld.com> wrote:

> Geeks,
>
> I can do what I want to do in Unix no problem. Doing it in dos/windows is
> the issue.
>
> For loop that looks for files fitting a certain file name
> Checking contents of that file.
> Rename file based on contents.
>
> In Unix I do...
>
> #!/bin/sh
> for X in *.xml; do
>     if [ `grep "\</Audit\>" ${X}` ]; then mv ${X} ${X}.done; fi
> done
>
> I've been playing with the for loops in DOS and got them to work, as well
as
> the find command, but the find command does not act like grep and doesn't
> give me output I can use. Anyone else solve this before?
>
> Thanks!
>
> -Jon
> _______________________________________________
> GEEKS:  http://www.sunhelp.org/mailman/listinfo/geeks



More information about the geeks mailing list