Write a script which prints a triangle of * characters. The first row should be a single *, the second **, and so on. You can use echo -n to print output without a newline at the end.
The number of rows is specified by the command line argument -r. If no argument is provided, print 4 rows.
Find the file called kangaroo.cow. Hint: start in /usr
Fine the directory called mess under /lab
Scattered across the subdirectories of mess are 5 scripts with the word lab
in their name.
Write a find command to make these scripts executable and move them to
/lab/week6/safe. Remember that wildcards in find patterns
must be quoted, otherwise shell will expand them.
Bonus
Modify triangle.sh to support command-line arguments for additional functionality:
--bottom -b Print a line of dashes (-) beneath the triangle to form a bottom edge
--rows, -r=ROWS Number of rows to print (default 4)
--character, -c=CHAR Use CHAR in place of * when printing. You may assume CHAR is a single-character string
--help, -h Display this help message and exit
Department of Computer Science & Software Engineering
The University of Western Australia
Last modified: 8 February 2022
Modified By: Daniel Smith