You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
eslopfer b236264e84 docs(plus): remove cat -e 1 year ago
..
README.md docs(plus): remove cat -e 1 year ago

README.md

plus

Instructions

In this exercise, you will make a script plus.sh that will take two arguments from the command line, add them and output the result.

Usage

$ ./plus.sh 2 3
5
$

Hints

Here are some commands that you can combine to find the solution:

  • expr: this command evaluates an expression and outputs the result.

  • command substitution - $(...): this command can be used to interpolate the output of running a command into a string. You can replace the ellipsis with your command.

You could use expr like this:

$ expr 2 - 2
0
$

And $(...) like this:

$ echo "This is the content of a file: $(cat file.txt)"
This is the content of a file: <content of the file>`
$

References