in reply to Re: Could someone please explain...
in thread Could someone please explain...

I have actually already written a brief explanation of each command and what they do to the person in question. A summary is as follows:

finds all files in the current directory and subdirectories and then using perl and regular expressions replaces the data that matches after s/ with the data after the next / and does it globally throughout each file (/g).

To further explain, I gave the example that <username> is some given username in the file like 'joe' for the first command and that the second command is searching for a set of 1-3 digits followed by a '.' then another set of 1-3 digits followed by a '.' and then another set of 1-3 digits followed by a '.' and then another set of 1-3 digits (e.g. an IP address) and then replaces it with ********* (however many I put in the regex)

I am doing this because I need the code that I wrote minus any usernames and passwords that might be in a given file.

I am attempting to make things faster and easier for them since they have said they will happily supply it, but since there are 40k files in the directory tree (most of which are actually open source, but they have no way to know if I put a username/password in there without looking) it would be far simpler to do it this way than by hand, which would, take a very long time.

It would also seem that their person that would be able to explain the command to them is currently unavailable and I need to get this completed asap.

This is why I put it on here, so they have a good and reliable reference of what these commands actually do.

Replies are listed 'Best First'.
Re^3: Could someone please explain...
by ww (Archbishop) on Apr 21, 2010 at 02:04 UTC

    Well, the last part of your explanation is certainly flattering to the Monks.
    And the first part is plausible. Your amplification answers my objections quite well.

    Nonetheless, you would have done better to include that explanation, at least briefly, in your original post.

    Your translations appear to be correct, but incomplete and a bit less than 'models of clarity.'

    They might well be improved with a note that the perl portion of your commands omits retention of an un-modified backup file (which might be a 'real good idea'). And both (unless you're confident about your audience's knowledge of *nix) would benefit from a fuller explanation of the expansive character of your arguments to find.

    I should probably add a disclaimer to the effect that 'no representation is made as to the fitness or validity of any expression of opinion herein. User assumes all risk....' but it's way too much trouble with draft something suitably filled with legalese and simultaneously amusing. :-{).

      I suppose I should have also included that i told them to make a copy to another directory and work on that directory instead of the original directory in my instructions :P

        Well, yes!

        Your approach attempts to make us guarantors of whatever you choose to do or your code does ...and without adequate information about the context in which you're acting.

        "Reckless" isn't nearly strong enough to describe doing so without full knowledge of what's actually going on.