Skip to content

Commit

Permalink
cut in bash
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Fedchenkov <[email protected]>
  • Loading branch information
giggsoff committed Nov 13, 2020
1 parent 2d15d7a commit 1a85f60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/network/testdata/test_networking.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[!exec:bash] stop
[!exec:grep] stop
[!exec:sed] stop
[!exec:cut] stop
[!exec:curl] stop
[!exec:sleep] stop

Expand Down Expand Up @@ -91,7 +91,7 @@ stdout 'no app with app3 found'

echo "defining of environment variables for the first app"

echo net=$(grep '10.2.0.0/24' network_ls | sed '$s/\(^[^\t]*\).*$/\1/')>.env
echo net=$(grep '10.2.0.0/24' network_ls | cut -f1)>.env
echo external_port=''>>.env
echo metadata={{$test_data}}>>.env
echo name=app1>>.env
Expand All @@ -106,7 +106,7 @@ $EDEN pod ps>pod_ps

echo "defining of environment variables for the second app"

echo net=$(grep '10.1.0.0/24' network_ls | sed '$s/\(^[^\t]*\).*$/\1/'),$(grep '10.2.0.0/24' network_ls | sed '$s/\(^[^\t]*\).*$/\1/')>.env
echo net=$(grep '10.1.0.0/24' network_ls | cut -f1),$(grep '10.2.0.0/24' network_ls | cut -f1)>.env
echo external_port=-p 8027:80>>.env
echo metadata=http://$(grep '10.2.0.' pod_ps | grep -o -E '10.2.0.[0-9]{1,3}')/user-data.html>>.env
echo name=app2>>.env
Expand All @@ -128,7 +128,7 @@ until curl $address | grep {{$test_data}}; do sleep 3; done

echo "defining of environment variables for the third app"

echo net=$(grep '10.1.0.0/24' network_ls | sed '$s/\(^[^\t]*\).*$/\1/'),$(grep '10.2.0.0/24' network_ls | sed '$s/\(^[^\t]*\).*$/\1/')>.env
echo net=$(grep '10.1.0.0/24' network_ls | cut -f1),$(grep '10.2.0.0/24' network_ls | cut -f1)>.env
echo external_port=-p 8028:80>>.env
echo metadata=http://$(grep '10.2.0.' pod_ps |grep app1| grep -o -E '10.2.0.[0-9]{1,3}')/user-data.html>>.env
echo name=app3>>.env
Expand Down

0 comments on commit 1a85f60

Please sign in to comment.