Section 5: Command Line Flashcards
What is the general order of command syntax?
first word is the command and the rest are the parameters.
What are the two types of parameters?
Start with a dash ( - a, - c or -ac) called options know as switches and arguments that have no leading dashes usually the name of the file/s the command will process.
what the two types of options?
short dash options ex: -a ,-c or -ac (they can be put together) or long dash options which use two dashes and can not be put together –
What is the general command structure?
Command ( what you want it to do) > Option ( How to do it) > Argument ( What to do with it)
What is the benefit of computing?
To simplify repetitive and huge tasks.
Shell allows us automate tasks by using shell scripts
true
What is a shell script?
A file containing a series of commands.
What is a variable?
Areas of memory that can be used to store information and are referred to by a name.
The benefits of a variable are?
Machine code more readable to users, a placeholder for unknown values, can be a value or a command, user doesn’t know value before they execute the program and it will be resolved at execution time.
Should you put spaces in variables?
no
What are the rules for naming variables?
Must start with a letter, a name not contain embedded spaces, no punctuation marks allowed.
How to you print all the environment variables?
printenv
What does an all uppercase variable indicate?
It is an environment variable.
What are meta characters?
characters that are treated differently by the command line ( or are special)
What does the shell use to identify the arguments for a command?
blanks/space are interpreted by the shell as how to separate arguments. More than one blank is still treated as one blank.