Merging 2 slightly differnet shell scripts together to acheive same outcome
hi all.
i have a kimsufi server, and i am wanting to it to syncronise back to my home linux system, but i want it to track what files have been transfered, so that if i move or delete them on my system, they wont re-sync back.
i have googled around and found 2 scripts that acheive this, but they do it in a different way, and only 1 of them logs the files to a database.
this is the first script, it will log the files to a mysql database, and it wont re-sync them. but it does it over r-sync and i want more security than that. i also want it to split up the files and support parallel transfers. it also uses python.
this is the second script that uses bash, and sends the files over LFTP. it therefor supports ssh and SFTP.
so i want to merge them together and have it use LFTP for the transfer, and then log it all to a mysql database.
but my coding ability is very limited. and i have no idea on how to do it. would anyone here be able to point me in the right direction to achieve the results im after?
Firstly let me start by trying to alleviate your concerns about rsync. Rsync uses ssh to perform it's transfers so it's every bit as secure as sftp via lftp.
Although python is a little more challenging to write and support than shell I think you have a program that is doing what you need and re-writing it in shell is probably unnecessary. Also because shell interaction with mysql databases is a little inelegant, this type of feature (processed list) is usually handled with a flat text file and unix tools like grep/awk.
Was not really happy with the NTP clients for the ESP8266 because, after a few years of game engine programming, I am not a fan of a lot of code and delays in the main loop, so here is a "slightly better NTP client" for the ESP8266.
In a nutshell, instead of having a delay in the main loop as a... (1 Reply)
Ive a problem that I'm reaching out for help.
Ive written (With bits and pieces) of script that is not running as expected or is having an issue causing processes to spiral out of control.
The script does this:
Unloads a UV database server
Tars up a few folders
Transfers the file to... (11 Replies)
I have two awk scripts shown below. checkTrvt.awk works on file format .xt, whereas checkData.awk workds on file format .dat
I want to merge the two scripts together, if I find that the user passed .xt file I do the code for .xt file, whereas if user passes .dat file, I go through the code for... (9 Replies)
Hi,
I am writing script to search the directories on different server. I have 3 servers. eg. ser1, ser2, ser2
find <absolute_path>-type d -user <user_name> -ctime +5 -exec ls -ltd {} \;
can someone please suggest me some way how can i use find command for this.
i have ssh connectivity... (1 Reply)
Hi Gurus,
I have installed the stuff needed for patchdiag for patching, its working okay , however after execution of pathcdiag.sparc i am unable to understand the summury which is produced at the end.
Please help !
Thanks (3 Replies)
I have 2 files pipe delimted and want to merge them based on a key
e.g file 1
123|xxx|yyy|zzz
345|xab|yzy|zyz
456|sss|ttt|foo
file 2
123|hhh|ggg|xxx
345|ddd|www|ddd|fff
456|ddd|sss|sss|eee
so if the key is the first field, and the result should be file 1 with field 2 from file 2... (24 Replies)
Hi All,
I have to write a script to send mail, in that i have to dynamically
add the recepient in TO and my cc is a common one.
For all mails my cc recepients are same. Only problem with TO recepient.
Please i am looking for your inputs. (1 Reply)
Hi,
I am using sqlplus (called inside my ksh) to create a file which is mailed to the users as an xls.
There is one DESCRIPTION column which is currently coming as wrapped, but, the users want a new line for each of the fields present in the desricription column.
Below is an example -
... (11 Replies)
Hi Gurus,
I would like to clarify some doubts regarding a backup strategy.
I have been working on various *NIX as AIX,Solaris and Linux.
I would like to design a backup procedure.WOuld it be possible for me to use a single LTO tape device to backup all the different server with different... (2 Replies)