Re: How do Unix grep, find, sort?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 02/26/05


Date: Sat, 26 Feb 2005 09:45:09 -0700


"noleander" <noleander@discussions.microsoft.com> wrote in message
news:55BCEEA9-01A9-4D10-AA5B-E7F1C21095D8@microsoft.com...
> Hi. I'm new to Windows, after programming for 20 years in Unix. I'm
willing
> to give Windows a fair shot, but I'm having a heck of a time getting
started.
> Here is a typical thing I'll need to do:
>
> *** Find all text files that are less than one month old (under a given
> folder) and within those files replace all occurances of string "xyz" with
> string "abc".
>
> I'm used to the Unix approach, piping commands like grep, find, and ex
> together.
>
> But I've been studying VBScript all day, and I swear I cannot figure out
how
> to do the above task.
>
> My question is: What is the normal scripting approach in Windows to
> accomplish the task I describe above? Pointers to sample code would be
much
> appreciated!

I am old to Windows, after programming for zero years in Unix. I have
*never* had the inclination or need to do the sort of thing you describe.

I strongly suspect that what one tends to do and tends to want to do is
subliminally influenced by what is readily done with the tools available. I
have no doubt that were I to move to a Unix environment I would have similar
problems when I found that the native toolset did not match my "needs".

That said, you might find the simplest solution would be to get windows
versions of the standard Unix tools. I know no references, so hopefully
others will provide these for you.

If your goal is to become a Windows admin scripting afficionado, using the
familiar Unix tools might actually hold you back, as it may keep you from
learning more about the native tools.

/Al



Relevant Pages

  • Re: What is the more popular UNIX flavor?
    ... about my experience with Solaris and Cygwin. ... installing packages. ... needing eg tftp you only need to activate on a Unix system. ... probably need installing first on the equivalent Windows system. ...
    (comp.unix.questions)
  • Re: Five Architectural Flaws in Windows Solved In Mac OS X
    ... But it is still an improvement over Unix, wherein *any executable* can be highly privileged and interact with the user. ... The usual security precautions prevent unauthorized people from doing this, but that's true on Windows also. ... I just got thru upgrading the wifes Mac to Tiger and hpfs is the default. ... This is a more advanced design that Unixes have been trying to duplicate by adding thread support. ...
    (comp.sys.mac.advocacy)
  • Re: Linux no threat to Microsoft
    ... originally developed for Unix. ... Windows has't come on any of the machines I've ever purchased. ... Yet over those years Linux Market Share on the desktop has actually ... philosophy of Apple - later adopted by Microsoft. ...
    (comp.os.linux.setup)
  • Re: OS X "Security" myths
    ... >> lot of UNIX systems down to their knees. ... >>> their code, so they concentrate on developing exploits for Windows, ... > It does tell me that there is not much "boast factor" for malware ... Just like the Hackers convention in Las Vegas known as ...
    (comp.sys.mac.advocacy)
  • Re: Wozu Linux privat einsetzen?
    ... > Open Source bzw. GNU sind nicht an eine bestimmte Plattform gebunden. ... Windows ist nun mal nicht OpenSource. ... > Unix ist genauso gewachsen wie DOS, OS/2, Windows. ...
    (de.comp.os.unix.linux.misc)