Shell Script Wanted -- 2

Closed Posted 7 years ago Paid on delivery
Closed Paid on delivery

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

Project ID: #11800319

About the project

29 proposals Remote project Active 7 years ago

29 freelancers are bidding on average £19 for this job

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 in 0 days
(25 Reviews)
4.9
zkutch

Hello. More 20 years programming experience. I need more details to set real time and price. Regards. -------------------------------------------------------------------------------------------------------------- More

£23 GBP in 1 day
(35 Reviews)
5.3
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 More

£18 GBP in 1 day
(6 Reviews)
4.5
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 in 3 days
(18 Reviews)
4.6
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 More

£20 GBP in 0 days
(6 Reviews)
3.7
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 More

£20 GBP in 1 day
(9 Reviews)
3.5
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 More

£20 GBP in 1 day
(6 Reviews)
3.2
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 More

£18 GBP in 1 day
(4 Reviews)
2.3
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 in 2 days
(7 Reviews)
3.1
vavy

Hello! can I use python for writting the script?

£17 GBP in 2 days
(2 Reviews)
2.6
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 More

£18 GBP in 1 day
(2 Reviews)
2.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 in 2 days
(2 Reviews)
1.9
burhan102

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

£15 GBP in 1 day
(1 Review)
0.2
pheonixsolutions

Hello, I understand that you would like to increase the .env file value whenever you create new website. Moreover, the count value shouldn't increase beyond 40. Correct me if I am wrong. I shall definitely help y More

£18 GBP in 1 day
(0 Reviews)
0.0
sanketgarg1989

I am expert in Shell script and i can complete your work in 3 days

£11 GBP in 3 days
(0 Reviews)
0.0
avinashtahakik

Hello, For the past 3 years I have been working in a company which works in the embedded domain, I write scripts like these on daily basis. I will deliver you the robust and high quality script. Looking forward to More

£19 GBP in 0 days
(0 Reviews)
0.0
Sandeeplade

Hello , I am new to freelancing and I am experienced in shell scripting I just want some opportunity. I am ready to do this for free.

£13 GBP in 1 day
(0 Reviews)
0.0
malli94909

Hi I'm interested in this project I hope I can do this.

£10 GBP in 1 day
(0 Reviews)
0.0
nisharadha93

A proposal has not yet been provided

£12 GBP in 2 days
(0 Reviews)
0.0
Onurc7

Hello, I am working as a FreeBSD System Administration. I am writing bash and sh shell scripts for my company. I can deliver your job within 1 day. If we will be agreed about job. I am going to ask you to send More

£10 GBP in 1 day
(0 Reviews)
0.0