Shell Script Wanted -- 2

Presupuesto £10 - £20 GBP
Ofertas 33
Oferta promedio £18
ABIERTO Termina en 1 día

I need a simple shell script.

Imagine there are some directories like this;




and so on

Every folder has .env file.

In every .env file following variable available;


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

Obtén cotizaciones gratis para un proyecto como este

¿Buscas ganar algo de dinero?

  • Establece tu presupuesto y el plazo
  • Describe tu propuesta
  • Recibe dinero por tu trabajo

Ofertas en este proyecto

  • blackorphan Profile Picture


    kochi,  India

    Am a perl programmer . Expert in bug fixing and scrapping .. :-) .

  • rajeshpal007 Profile Picture


    India Gate,  India

    10+ yrs of experience in Software Development, and Testing. We are a team of 5 Experts in IoT, Embedded , Telecom, File System, Security & Scalable Server Professional in Linux, Unix, Windows With C, Cpp, Shell Script, Python, Perl, OSS, Firmware, Device Driver, Linux System Calls, Board Bring up, Wireless network, Router Development, openWRT linux, Router tuning, OpenStack, IoT (Internet of Things) integration with zigbee, alljoyn, Home Automation using Raspberry-pi, Arduino , and Sensors. WebRTC based audio & video streaming product. Have taught online courses. Domains: A. Embedded / IoT Domain B. Security Domain( DRM & Network Security) C. Telecom Domain( DNS/EDNS, VOIP, SIP), D. Embedded Domain( Virtualization & FileSystem). E. Cloud(OpenStack) All with minimum 8 years of industry experience. Team have worked with QualComm, Cavium, Aricent, NEC, Juniper, LSI, Intel, Samsung for Development. Phone : +91 9910005326

  • twinklesoft Profile Picture



  • scrumsl Profile Picture


    Vantaa,  Finland

    Android Application Development Testing Analytics Architecture Web Network DevOps ETL Testing Big Data Cloud

  • luislencina Profile Picture


    Victoria,  Argentina

    Ingeniero Nuclear con mas de una década de experiencia en programación buscando trabajos freelance para hacer en tiempos libres

  • ikorolev Profile Picture


    Rostov-na-Donu,  Russian Federation

    With 15 years of system administration and software development experience, I have the right skills needed to complete your projects the right way. I have a lot of experience any network and system administraton task, firewalls, routing, vpn, san, nas, external disk storages and tapes, monitoring, backup/restore, services like ssh, dns, apache, ngnix, vnc, smtp and so on. Integration and replication different databases and aplication in unix enviroment, virtualisation. And certanly advanced bash and perl scripting. My github: Profile site: Technologies: Operation system Solaris, Ubuntu, Centos, Debian. UNIX Development: perl, bash, awk, c Web Services: apache, ftp, mail, dns, ngnix, backup/restore, apache Networking: OpenVPN, PPTP, IPSEC, L2TP, iptables, routing Database integration: MySQL, Postgresql, Oracle Environment: LAMP, Amazon AWS, Rackspace api etc. Virtualisation: VMware, KVM, Oracle VM, LDOM, Solaris Zones

  • deep2106 Profile Picture


    New Delhi,  India

    We are group of highly qualified professionals working in various fields including Data Mining , Mathematics, Computer Science , Statistics , Data Analysis , Machine Learning, Bioinformatics and Computational Biology. Our group members have expertise in following technical skills to address questions arises in above mentioned area. 1. MATLAB 2. PYTHON 3. R Statistical Package 4. Microsoft Excel 5. MySQL 6. Mathematica 7. Weka We are offering detailed, well commented and systematically organized solutions on time to our clients. We also bound to help our clients for understanding of underlie theories and tricks for solving particular problem.

  • lohit313 Profile Picture


    Banglore,  India

    i am new to freelancer and good in scripting languages. i am looking for the opportunity to get explore.

  • Onurc7 Profile Picture


    Istanbul,  Turkey

    Java/C/C++ programmer with experienced in - Core java - Web application development - Embeded systems. Bash scripting and any other Linux/Unix tasks are welcome. I am active FreeBSD user. I have strong knowledge on Network Administration / Network Security and Firewalls. PostgreSQL system administration.

  • baselalmasri Profile Picture


    Sharjah,  United Arab Emirates

    22 years experience in software design and development using variety of programming languages and platforms.