Shell Script Wanted -- 2

Закрито

Опис

I need a simple shell script.

Imagine there are some directories like this;

/var/www/website1/.env

/var/www/website2/.env

/var/www/website3/.env

and so on

Every folder has .env file.

In every .env file following variable available;

DB=1

in another .env file DB=2

another .env file has DB=3

and DB=4

DB value is unique for each .env file for each website folder so each .env file should have different digits that never used in other .env files.

These are applied manually with vim editor now but i want to do it with shell script. At the moment I copy website folders and manually change DB value in new .env file.

Somehow shell script needs to grep DB variable and its value. List the digits (1,2,3 in above example) from varible DB in .env files and Sort them in order like 1,2,3,4...

Count 1 to 40 because DB value should not cross 40.

if .env files have DB value 1,2,3 then next DB value should be 4. When i create a new .env file shell script should replace new .env files DB value to 4 (DB=4).

Shell script needs to find which one is the next digit up to value 40 though.

Any questions please ask. Thanks

Навички: Perl, Python, Shell Script

Показати більше: script shell scanning list, ajax vbnet dropdown callback list example, database change reorder list, wow 300 change realm list, wow trial change realm list, wow change server list, script shell, virtuemart change product list, outlook script forward email change subject line, world warcraft change realm list, change craig list area florida, php script update database using drop list menu, change realm list wow, script usb registry change, wow change realm list

ID проекту: #11800319

33 фрілансерів(-а) подали заявки на цю роботу; середня заявка - £19

zkutch

Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -------------------------------------------------------------------------------------------------------------- Більше

£23 GBP за 1 день
(28 відгуків(-и))
5.1
cracken

I can do it to find the files recursively using script and can update the data based on your requirements. Let me know the best of your time so we can discuss and move forward to the next level.

£19 GBP за 0 дні(-в)
(11 відгуків(-и))
4.2
ikorolev

Hello! I have 15 years experience in the administration of Linux-based OS and advanced perl and bash scripting. I was doing these tasks before, and I can help you with the project. You see several my projects with p Більше

£19 GBP за 1 день
(1 відгук)
3.5
thms00

Dear sir, I am Thomas, 24, from France. I have been using Linux for over 8 years, and I've graduated in the IT field in a French university a few years ago. Since then, I've been working in the IT industry. I Більше

£20 GBP за 1 день
(9 відгуків(-и))
3.5
vavy

Hello! can I use python for writting the script?

£17 GBP за 2 дні(-в)
(2 відгуків(-и))
2.6
arrjon

Hello, I am an experienced python developer, thus I could writing a python script instead of a shell script to manage your DB values. If this is okay for you, I could start immediately. Here is what I would do: Більше

£18 GBP за 1 день
(2 відгуків(-и))
2.6
bhoir

hello Very simple bash shell script would fix the DB value in .env for given folder. call : ./fixDBId.sh -websitefoldername <<website2>> looking fwd to hear back from you. Refards Sandip

£18 GBP за 1 день
(2 відгуків(-и))
2.7
AVKor

Hello, I am an expert in Linux (18 years of experience; Debian, Ubuntu, CentOS and many others) and shell scripting. What are you expecting after DB=40? I'm ready to start working on your project.

£19 GBP за 3 дні(-в)
(5 відгуків(-и))
2.9
£55 GBP за 1 день
(2 відгуків(-и))
2.7
SergeyKyiv

Greetings! My name is Sergey Murzin, I'm from Kyiv, Ukraine. I have 25 years experience in programming. Any code I provide is well structured and commented, client gets whole access and rights for the code I m Більше

£20 GBP за 1 день
(1 відгук)
2.4
skriyaz09

I have been working as a software developer for more than one and half year on Linux environment and good at handling these kind of scripts

£23 GBP за 2 дні(-в)
(2 відгуків(-и))
2.4
baselalmasri

Hello, I can do this for you. But it is not clear if you want the script to just give you the next DB value and you enter it manually in the "new" .env file or you want the script to do the editing of the "new" .env fi Більше

£18 GBP за 1 день
(1 відгук)
2.1
kunashe

Hi! I would be happy to help with this. May you please let me know if I have this right: You would like a script that assigns a DB value in new .env files (empty). The value of DB is sequential based on the ex Більше

£20 GBP за 0 дні(-в)
(2 відгуків(-и))
2.1
Walrusyn

Hi, I'm a Linux sysadmin with 15 years of experience and I use to build this kind of scripts. Would love to help you with this script and build it in bash. Looking forward to hearing from you. Best regards, M Більше

£18 GBP за 1 день
(2 відгуків(-и))
2.0
deep2106

hello, we have great experience in writing shell scripts for various academic works and your problem is trivial enough to solve . We provide you shell scripts where you need to pass only DIRECTORYPATH argument and it w Більше

£18 GBP за 1 день
(2 відгуків(-и))
1.4
haukeric

If Python script allowable then I could build you a flexible script to make sure the DB variables are unique and auto generated from 1 up to 40 in the .env files.

£20 GBP за 2 дні(-в)
(1 відгук)
1.6
burhan102

HI .. I can do this task.. lets discuss in detail....................................................

£15 GBP за 1 день
(1 відгук)
0.2
scrumsl

#!/bin/bash whoami="bash guru"

£29 GBP за 3 дні(-в)
(0 відгуків(-и))
0.0
diannaw

I am Red Hat Certified Engineer, Red Hat Certified Expert in Clustering and Enterprise Storage Management with 8 years of Linux System Administration experience, 2 years in Robotics. Very experienced in automation work Більше

£20 GBP за 1 день
(0 відгуків(-и))
0.0
blackorphan

I can do this on Perl . pay as u like ..

£13 GBP за 1 день
(0 відгуків(-и))
0.0