Gregory Pettigrew (etherial) wrote,
Gregory Pettigrew

  • Mood:


I've identified a procedure at work that is repetitive enough that doing it manually is error-prone and is a prime candidate for scripting. I have no experience writing Unix (Ubuntu) scripts. Here are the technical details I need help with:

1. Files are being moved from Point A to Point B. I am informed when this process begins and would like to start the script to copy some of them to my local directory (Point C) ASAP (i.e. before they are done being copied to Point B).

2. I need to extract portions of sub-folder names so I can insert them into a series of commands. (I'm sure this is a job for grep. grep is black magic.)

3. I need to extract a portion of a text file and likewise insert it into a series of commands. (See note on Item 2.)

4. Script will take foo as an argument and likewise insert it into a series of commands.

5. I need an if statement checking whether foo is greater than a certain number, with an extra line if the statement is true.

6. I want to be alerted when the files are finished copying.

  • The Love of Things

    I love things. I love taking my things out of their boxes, holding them, fiddling with them, recalling previous times I'd played with them, worked…

  • Fantastic Beasts and Where to Find Them

    While I continue to be ticked off at J. K. Rowling for her complete mishandling of Magic in North America, my position on this particular film has…

  • On Third Parties

    I was a paid staffer for Phillies 2008, a Libertarian Party Presidential Campaign. By then, I was already identifying as a Small Government…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded