two Flashcards
comment
#
How to remove permission from a file
ug=
what is the symbols for decimal integer and float number
%d
%f
what is the symbol for a string
%s
what is printf format
printf “char constants %s %f…” $variable
What is the use of$ (….)
The function of$ (….)is to implement command in it, not like ${…} is used to contain the variable name
default shell variable value
echo ${variablename=value}
The difference between ${variable=value} and ${variable-value}
${variable=value} will assign value to variable
${variable-value} won’t assign value to variable
assign a default value to a variable
${variable:=value}
${variable=value}
can we put space character between a assignment operator
No, we can’t put space character between = which will result error
Is underscore viable in the variable specifier
_name
can we use echo to print the file name in current directory
echo *.fileextension
printf format
printf “%w.pL” $variable
%w for width
p for decimal digits after decimal point
L for variable type
How to quote without translate the $ sign
use single quote
wildcards in single and double quotes
echo “/etc/*.conf” will not translate *
echo ‘/etc/*.conf’ will not translate *