Skip to content

Commit

Permalink
Add -m1 in the last grep to fetch the first result
Browse files Browse the repository at this point in the history
  • Loading branch information
mikescandy authored and PiotrJustyna committed Oct 19, 2021
1 parent 75a6509 commit 90aec47
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 3/run-client-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -m1 ""`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT=3000

docker build -t client -f ./ops/Client/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3/run-silo-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -m1 ""`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT=3000

docker build -t silo-host -f ./ops/SiloHost/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3a/run-client-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT=3000

docker build -t client -f ./ops/Client/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3a/run-silo-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT=3000

docker build -t silo-host -f ./ops/SiloHost/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3b/run-client-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT='3000'

docker build -t client -f ./ops/Client/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3b/run-silo-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v -m1 '127.0.0.1'`
GATEWAYPORT='3000'
DASHBOARDPORT='8080'
DATADOG_SERVICE_NAME='road-to-orleans-3b'
Expand Down

0 comments on commit 90aec47

Please sign in to comment.