mirror of https://github.com/01-edu/public.git
docs(set-env-vars): add hints, fixx the test to block echo and fix solution
This commit is contained in:
parent
13435eb8f1
commit
497b331f9d
|
@ -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!"
|
||||
|
|
|
@ -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_"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue