Learn Bash Scripting by Building Five Programs 1330.1 fortune.sh


Your patterns have been checking for literal matches, el and lo wor. You can use regular expression characters as well, but you can’t put the pattern in quotes when you do. Using the same syntax, check if hello world starts with an h by using ^h as the pattern.

The command echo $? returns the exit status of the preceding command.
0 here means true.

If you are sure you are entering the correct command and the tests should pass, try resetting the tutorial with the reset button.

Here are some additional steps:

1 Like

cleared c&c, reset - works now

1 Like