minor fixups

This commit is contained in:
anon
2024-08-17 15:22:39 +02:00
parent 577617a3f3
commit 5dbb23ed8c
10 changed files with 14 additions and 10 deletions

View File

@ -13,7 +13,7 @@ function description() {
}
function hint() {
echo -e "For example, '${YELLOW}echo Hello World${NORMAL}'"
echo -e "For example, '${YELLOW}\$ echo Hello World${NORMAL}'"
}
function validate() {

View File

@ -31,7 +31,7 @@ function description() {
}
function hint() {
echo -e "${YELLOW}$ touch \"space space space those are 3 spaces\"${NORMAL}"
echo -e " ${YELLOW}\$ touch \"space space space those are 3 spaces\"${NORMAL}"
}
function validate() {

View File

@ -25,7 +25,7 @@ function description() {
}
function hint() {
echo " $ [ 0 == 0 ]"
echo -e " ${YELLOW}\$ [ 0 == 0 ]${NORMAL}"
}
function validate() {

View File

@ -38,7 +38,7 @@ function description() {
}
function hint() {
echo "You will need to fill up 2 variables and create 'new file' so cat" \
echo "You will need to fill up 2 variables and create 'new file', so that cat" \
"does not encounter an error due to the file missing."
}

View File

@ -45,6 +45,7 @@ function description() {
}
function hint() {
echo "You will need to use a replacing expansion inside a for loop."
echo -e "If you mess up, you can regenerate the files with" \
"'${YELLOW}initialize_control_task${NORMAL}'."
}

View File

@ -34,7 +34,7 @@ function description() {
}
function hint() {
echo "function a() { return 231; }; a"
echo -e "${YELLOW}\$ function a() { return 231; }; a${NORMAL}"
}
function validate() {

View File

@ -30,8 +30,9 @@ function description() {
}
function hint() {
echo "The first 3, the next 1, the next 1 after that and" \
echo "The first 4, the next 1, the next 1 after that and" \
"the closing 3 belong to the same pattern."
echo "| a aa aaa aaaa | bc | bűb | aaaa bbbb cccc |"
}
function validate() {

View File

@ -18,7 +18,7 @@ function description() {
}
function hint() {
echo -e " \$${YELLOW}man bash${NORMAL}"
echo -e " ${YELLOW}\$ man bash${NORMAL}"
}
function validate() {

View File

@ -17,7 +17,9 @@ function description() {
function hint() {
echo "Using man, open the 'bash' manual page" \
"and search for the definition of the PS<int>" \
"variables."
"variables."\
"(If you have difficulty controlling man,"\
"open the internal help using 'h'!)"
}
function validate() {

View File

@ -28,7 +28,7 @@ function description() {
function hint() {
echo "Consider the following case, which relies on an understanding of" \
"the previous chapter on argument splitting:"
"the previous chapter about argument splitting:"
echo -e " ${YELLOW}$ song=\"My song.mp3\"${NORMAL}"
echo -e " ${YELLOW}$ rm \$song${NORMAL}"
echo -e " ${YELLOW}rm: My: No such file or directory${NORMAL}"
@ -38,7 +38,7 @@ function hint() {
"and only THEN executed the command. It was as if you had typed this:"
echo -e " ${YELLOW}$ rm My song.mp3${NORMAL}"
echo "And according to the rules of word splitting," \
"Bash thought you meant for My and song.mp3 to mean two different files," \
"Bash thought you meant for My and song.mp3 to represent two different files," \
"because there is white space between them and it wasn't quoted." \
"How do we fix this?" \
"We remember to put double quotes around every parameter expansion!"