In Chapter 1, the shell split your line into words, and the first word was the command. Now you will use the other words.
The words after the command
The words after the command are arguments. The shell gives them to the program.
echocommanddeployargument 1finishedargument 2
echo writes its arguments, with one space between them:
text
learner@tidepool:~$ echo deploy finished
deploy finishedThe shell removes the extra spaces
The shell splits the line at the spaces. The spaces are not part of the arguments. More spaces between two words give the same two arguments:
text
learner@tidepool:~$ echo deploy finished
deploy finishedThe next lesson shows how to keep the spaces.
Each program decides what its arguments mean
cat writes the text that is in a file. Its arguments are the names of the files to read:
text
learner@tidepool:~$ cat notes.txt
deploy started
build ok
deploy finishedGive cat two file names, and it writes the two files, one after the other.
cat notes.txt
output
deploy started …the text in the file
echo notes.txt
output
notes.txtthe word itself