Hands-on task
This task is step 18 of the course “Bash scripts: from a loop to a robust script”
Array in bash
Write /root/fruits.sh: declare an array of apple banana cherry, then output each element on a separate line. Run it, and save the output to /root/fruits.txt.
What you'll practise:
- bash arrays
- for loop
- quoting
- output redirection
- chmod