@@ -163,7 +163,7 @@ $ cd myfolder || ls # if failed cd to myfolder, `ls` will run
# Permissions and execution
- Bash script is nothing else just a **text file** containing instructions to be executed sequentially
- Bash script is nothing else than a **text file** containing instructions to be executed sequentially
> by default in Linux, a new text file's permissons are **-rw-r--r--** (or 644)
- You can run the script `hello_world.sh` using
*`sh hello_world.sh`
...
...
@@ -454,7 +454,7 @@ esac
1. In your `bash_exercises` folder create a new bash file called `exercise_2.sh` and make it executable
2. Ask the user for two numbers smaller or equal to 100, put them in variables `NUMBER1` and `NUMBER2`
3. Do the following only if the number are smaller than 100
3. Do the following only if the numbers are smaller than 100
4. Check if at least one of the numbers is a multiple of 3, and tell the user
5. Otherwise, check if both numbers are even, and tell the user
6. If the user's numbers ar too big, tell them
...
...
@@ -614,7 +614,7 @@ done
Speed game:
1. Use the following webiste to get a list of random words: https://randomwordgenerator.com and put them together in a variable
1. Use the following website to get a list of random words: https://randomwordgenerator.com and put them together in a variable
2. Register the start time with `date +%s` and put it in a variable `TSTART`
3. Loop over the words and ask the user to give the number of letters. Put the answers in an associative array using the words as keys and the answers as values