review Flashcards
What kind of operators are used to compare strings in bash?
symbols
whta kind of operators are used to compare numbers in bash,
-lt, -gt, eq,
if I print num1=ipaddr
what is printed and why?
when using backquotes the command is printed
What symboils need to have there special meaning taken away to be printed?
n
t
“
*
\
` backtick
\
*
“
When using quotes in bash, what do single quotes represent?
The literal string value of what’s printed
When using quotes in bash what do back quotes represent `
I use them to capture the output of a command, so I wanted to add a variable thast contains the output of the date command I’d add back quotes
What does $0 represent bash?
Name of the command used to call current program
What does $# represent in bash?
Stores the number of arguments passed to script or function
What does $* represent in bash?
Refrences all argyuments passed to a script or function
What does $1, $2, $3 represent in bash?
Stors the fist nine arguments in incrementing variables passed to script or function
What does $? represent in bash?
stores ecxit status of previous command
How do I find the length of a string? Which of therse commands will work and what do I need to do to them to make it work? What do both do?
${[name[*]}
${#name[*]]}
returns all the values of an array as a single output
returns the number of elements of an array or if an index is placed inside will give the length of that specific element
What branching statements are used in bash?
What kind of brackets are used when evaluating them?
if, then, elif, else, fi
[]
What symbol declares a character class in regex
[]
What stream number represents STDIN?
0