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 > [login to view URL]"
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 > [login to view URL]"
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.
I have strong background in unix linux environment and can take good care of your project on time and with quality. Let me know the best of your time to discuss so we can move forward to the next level.
Hello there, I'd like to know few details about the project if you're considering me, thanks and good luck with the project.
Note: I can ONLY provide a python script.
ITICY Technologies is an IT Service, leveraging company specializing in GNU/Linux and open-source. AT ITICY Technologies we see our customers as a part of the solution rather than part of the problem. We have all the necessary experience, skills and expertise in open-source technologies and leveraging IT services. If you need any open-source solution or customization and configuration for any mission-critical application, we are doing it.
We have more than a decade experience in GNU/Linux, Unix and other open-source applications.
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.
Hi,
I can do this but pl clarify few things.
1. "so python can no execute own functions". What does 'no' mean?
2. If there is no connection between , how would you know whether commands failed?
3. At one place you want 3 directories, at other place 12. Why?
4. What's the whole purpose/application of the task.
Pl communicate on PMB.
I've done it in past.
Before getting to the proposal, I'll outline the requirements as I've understood them.
You need :
1) A ksh script
2) A Python script
Both of these have the same functionality and should work independent of each other? Or should the Python script make use of the shell script to achieve the same purpose?
The difference between the two is that the shell script should read 3 folders and the Python script should read 12 folders, based on the name of the folder (date format).
Proposal:
- Both the shell script and the Python script will take a variable, which will determine the directory where the program will run.
- The number of folders it will look at will be made flexible so that future enhancements will be easy.
- If required, the Python script can be made to leverage the shell script, to prevent redundant code logic.
Questions:
- Should the logging and email facility be a shell or Python feature, or both?