diff --git a/sh/tests/set-env-vars_test.sh b/sh/tests/set-env-vars_test.sh index e84ad193d..35d51e2c7 100755 --- a/sh/tests/set-env-vars_test.sh +++ b/sh/tests/set-env-vars_test.sh @@ -7,6 +7,7 @@ IFS=' FILENAME="student/set-env-vars.sh" +# echo not allowed if [ -s ${FILENAME} ]; then if [[ $(cat $FILENAME | grep echo | wc -l) -ne 0 ]]; then echo "echo is not allowed in this exercise!" diff --git a/sh/tests/solutions/set-env-vars.sh b/sh/tests/solutions/set-env-vars.sh index 12768eeca..eab92dfc8 100755 --- a/sh/tests/solutions/set-env-vars.sh +++ b/sh/tests/solutions/set-env-vars.sh @@ -3,4 +3,5 @@ export MY_MESSAGE="Hello World" export MY_NUM=100 export MY_PI=3.142 +# Grep only new vars printenv | grep "MY_" diff --git a/subjects/devops/set-env-vars/README.md b/subjects/devops/set-env-vars/README.md index 7c9065a65..521a91c9f 100644 --- a/subjects/devops/set-env-vars/README.md +++ b/subjects/devops/set-env-vars/README.md @@ -15,16 +15,12 @@ $ printenv # The env variables present are just an example, yours will be diffe SHELL=/bin/bash TERM=xterm USER=demouser -LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca:... MAIL=/var/mail/demouser PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PWD=/home/demouser -LANG=en_US.UTF-8 SHLVL=1 HOME=/home/demouser LOGNAME=demouser -LESSOPEN=| /usr/bin/lesspipe %s -LESSCLOSE=/usr/bin/lesspipe %s %s _=/usr/bin/printenv $ ./set-env-vars.sh MY_NUM=100