In Unix I have observed the following two statements give the same results:
echo $SHELL
echo "$SHELL"
Both the methods will process the variable and prints which shell is running.
To take the input as text, whether or not there are variables included, it would be included in single quotes
echo '$SHELL'
The output would be $SHELL
Here are some more commands which are commonly used:
tput clear
# Clears screen
ls -l > list
#Saves the list of files and directories in the current directory with attributes (-l) in "list" file.
cat filename
# Display file contents
wc list
# Counts number of lines. x lines, x words, x characters
Anything starting with hypen (-) is an option. It needs to be separate, that is no characters after or before it.
Comment/Reply (w/o sign-up)