increment value found in config file

Lukket Lagt ut 5 år siden Betales ved levering
Lukket Betales ved levering

Hi , i have a configuration file with values such as ports which are the same.

Example Input

Server1 1.2.3.4:20000

Server2 1.2.3.4:20000

Server3 1.2.3.4:20000

I need to replace all instances of 20000 with an incremented value.

Example output:

Server1 1.2.3.4:20001

Server2 1.2.3.4:20002

Server3 1.2.3.4:20003

Bash Scripting

Prosjekt-ID: #18319191

Om prosjektet

7 bud Eksternt prosjekt Aktiv 5 år siden

7 frilansere byr i gjennomsnitt $27 for denne jobben

VarunUnix

Hello, Instead of replacing on the same file, i can write script to create a new file with the incremented port and then replace the original file. This is a simple task which can be done in 1 hr. Thank You.

$15 CAD på 1 dag
(5 Omtaler)
2.6
deytps86

Hi This is an interesting project and I guess it can be completed in a couple of hours using bash shebang. Can we discuss? Thanks

$40 CAD på 1 dag
(1 anmeldelse)
1.6
ukgolang

Hi, i'm a Linux systems administrator with 10 years experience. I can complete your increment task right away. Please check out my feedback.

$25 CAD på 1 dag
(2 Omtaler)
1.4
AVKor

Hello, I'm an expert in Linux (18 years of experience; Debian, Ubuntu, CentOS and many others), bash/shell scripting , etc. Please look at my profile for my previous bash/shell projects.

$30 CAD på 1 dag
(2 Omtaler)
0.8
AsfaqPatel

Hi... I can do your work.... I am Delphi/Pascal programmer... with SQL Server Database... I have good skill of file handling.. such as Text, CSV, Json etc...

$25 CAD på 10 dager
(0 Omtaler)
0.0
ankushagarwal87

Hi I am interested in working in your project & can help you here. We can discuss more about need over chat.

$30 CAD på 1 dag
(0 Omtaler)
0.0