Closed

loop script in python and bash shell script

This project received 17 bids from talented freelancers with an average bid price of €39 EUR.

Get free quotes for a project like this
Employer working
Project Budget
€8 - €30 EUR
Total Bids
17
Project Description

this is a request for two separate scripts that perform the same function.

the first is to be developed in python and the second in ksh compatible shell

script. Minimum scripts compatibility python version 2.6.1 and ksh shell.

both of the scripts should have the same functions and features.

the required features are:

- the scripts will be running on linux or freebsd OS

- define the work path: work at a given directory path, for example: /foo/bar/my/app/data.

the path in question has directories that are named in date format, for example: /foo/bar/my/app/data/201610

- the folder name string (the date format) may vary, additional information will be provided.

- the work path may contain other folders with different names.

- the script should identify the 3 latest directories, for example:

/foo/bar/my/app/data/201610

/foo/bar/my/app/data/201609

/foo/bar/my/app/data/201608

for each of the three identified directories, a set of commands will be issued. for example:

- "ls -l"

- "du"

- "ls -l > [url removed, login to view]"

these commands to be executed, should be executed from the shell so python can no execute own functions but has to leverage the shell.

- the script should identify the 12 latest directories, for example:

/foo/bar/my/app/data/201610

/foo/bar/my/app/data/201609

/foo/bar/my/app/data/201607

/foo/bar/my/app/data/201606

/foo/bar/my/app/data/201605

/foo/bar/my/app/data/201604

/foo/bar/my/app/data/201603

/foo/bar/my/app/data/201602

/foo/bar/my/app/data/201601

/foo/bar/my/app/data/201512

/foo/bar/my/app/data/201511

/foo/bar/my/app/data/201510

for each of the identified directories, a set of commands will be issued. for example:

- "ls -l"

- "du"

- "ls -l > [url removed, login to view]"

these commands to be executed, should be executed from the shell so python can no execute own functions but has to leverage the shell.

- all events and actions performed by the scripts should be logged

- in an event of failure at any stage, the scripts should send and email to specified email address with the failure and a copy of the log that the script has generated as an attachement.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online