Devam Ediyor

507078 Perl script - look for values - compress and send

Hello,

Need a perl script to run on a Linux server that can do this:

1. When a file is detected here: /DMDS/34.Execute-update/[url removed, login to view]

• Copy this file: /DMDS/34.Execute-update/TMP/[url removed, login to view]

To: /DMDS/34.Execute-update/TMP/$[url removed, login to view]

The variable DMDSDATUM=$(date '+%YYYY-%MM-%DD-%HH-%MM-%SS')

So the file gets a year-month-hour-minute-day-minute-second file name.

• For testing purposes you can just have anything in that file - /DMDS/34.Execute-update/[url removed, login to view] since that file will only exist on my server.

2. Check so this file does not have any white space in it: /DMDS/34.Execute-update/TMP/$[url removed, login to view]

• Test to enter any data into a file and have whitespace in it – if the script works it should remove the white space.

3. Then create these files:

• echo $DMDSDATUM > /DMDS/34.Execute-update/TMP/$[url removed, login to view]

• echo $DMDSDATUM > /opt/lampp/htdocs/execute-update/overwrite-update-tmp/[url removed, login to view]

• echo $DMDSDATUM > /opt/lampp/htdocs/execute-update/overwrite-update-tmp/[url removed, login to view]

• echo $DMDSDATUM > /opt/lampp/htdocs/execute-update/overwrite-update-tmp/Update-ID-$[url removed, login to view]

Same as before the $DMDSDATUM variable is: = YYYY-%MM-%DD-%HH-%MM-%SS

4. Then compress all files and folders here: /opt/lampp/htdocs/execute-update/overwrite-update-tmp/*

• Compress all files and folders to a .[url removed, login to view] file with a password/encryption.

• I looked into gpg for password protection – but open to suggestion here on what you think is best.

• Also need to have a command line that I can use later to uncompress the file – from a bash script.

• For testing purposes you can put any files/folders here /opt/lampp/htdocs/execute-update/overwrite-update-tmp/ so you can test.

5. Then execute a ncftpput command:

• ncftpput -u test -p test [url removed, login to view] /[url removed, login to view] /DMDS/34.Execute-update/TMP/$[url removed, login to view]

• ncftpput -u test -p test [url removed, login to view] /[url removed, login to view] /DMDS/34.Execute-update/TMP/$[url removed, login to view]

• ncftpput -u test -p test [url removed, login to view] /[url removed, login to view] /DMDS/34.Execute-update/TMP/$[url removed, login to view]

If you don't have an ftp server to test with – I have one you can use.

6. Last commands:

• Delete folder /opt/lampp/htdocs/execute-update/overwrite-update-tmp/

• Delete all files here: /[url removed, login to view] /DMDS/34.Execute-update/TMP/*

• Delete this file /DMDS/34.Execute-update/PID/[url removed, login to view]

• Delete this file /opt/lampp/htdocs/execute-update/trigger/*

7. I want the script to run as a daemon.

8. And it should log to a file what it's doing.

Good luck - and thanks for help,

Best regards,

Johan

Beceriler: Her şey Kabul, Perl, PHP, Kabuk Betiği

Daha fazlasını görün: look php id, bash copy, second last name, bash file, bash 0, testing p, perl linux, mvg, minute script, linux bash script, johan, hh, gz, gpg, bash script, php script execute, update bash script, run script linux, linux perl bash, run linux command php, bash script variable, php delete file tmp folder, perl script file, create script linux, perl linux daemon

İşveren Hakkında:
( 43 değerlendirme ) Stockholm,

Proje NO: #2253005

Seçilen:

therealsolidcode

Great results

2 gün içinde 185$ USD
(88 Değerlendirme)
6.6