1/31
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Which text editor is default on Linux systems
vi/vim
How do you access command mode in vi/vim
ESC
How do you access insert mode in vi/vim
(i)
How do you get into extended mode in vi/vim
(:)
While in command mode in vi/vim what key can you use to repeat the most recent change you made
(.)
What command can you use to undo an action you just performed
(u)
What command can you use to search for a string in a file
(/)thing
How can you save changes without quitting
:w
What 3 ways can you save changes and quit
:wq :x ZZ
How can you copy text from an existing file into a current one
:r filename
What 2 methods can you use to execute a command without leaving the editor
:!commandName, Ctrl + Z and fg to return back into vim
What ways can you use to get help with vim
:help, man vi, :!man vi (within vi)
What do you add at the beginning of a shell script to let the system know a script is being started
#!/bin/sh
Before a file can be ran what command can you use to change the permissions
chmod 755 file OR chmod u+x file
Variables can only contain letters numbers and what special character
(_) underscore
What is the proper syntax for initializing a variable
variableName=variableValue
How can you display the contents of a variable
echo $variableName
How can you assign a variable to be read only
readonly variableName
What can you do to remove a stored variable
unset variableName
What is a way that you can add 2 variables containing an integer together
sum=$(expr $varOne + $varTwo)
What is the correct format for conditional expressions
[ $a == $b ] the spaces must be included
What command shows a list of processes with the current login session
ps
What could you use to check if variable A is equal to the contents in variable B
[ $A -eq $B ]
What signifies the end of a case statement
esac
What signifies the end of an if statement
fi
What looping mechanism tests the loop condition each time
while
What is the syntax to run a script named filesort
./filesort
How many different modes are there in the vi editor
3
In Linux, __________ structure simplifies selection of a match when you have a list of choices
case logic
What could you use to quit a file without saving in vi
:q!
In _____________, a control structure repeats until a specific condition exists or some action occurs
Looping logic
In Linux, the ______ statement is used to terminate the execution of the entire loop, after completing the execution of all of the lines of code until that statement.
break