CS155: Introduction to Unix

Spring 2018

Command Anatomy

See this page as a slide show

Anatomy of a Command

command options arguments <input >output

Options start with a dash, and are, y’know, optional. An option might have its own option-argument, or it might not—it could be -f or -o foo, depending on the command.

Arguments

An argument could be pretty much anything. It might be a filename, as in cat food, or it might be a word, like echo Hello.

Examples of Commands

No options or arguments date
Two arguments cp from to
One argument echo "hi there"
One option, output redirection date -u >gmt
Two options w/arguments, one filename argument cut -d"/" -f 3 bob
Is foo an option argument, or a regular argument? alpha -b foo bar

User: Guest

Check: HTML CSS
Edit History Source

Modified: 2016-08-21T19:00

Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2018 Colorado State University
CS Building