Shell scripingby harsha
Important points only:
- Variables in shell can be accessed by below 3 ways:
echo ${A}
echo "${A}"
- If you want variable subsitution in string use double quotes, single quotes will not substiute value it will print symbol itself

❯ echo "Value of a is ${A}"
Value of a is 100
❯ echo 'Value of a is ${A}'
Value of a is ${A}
- The ‘-e‘ option in Linux acts as an interpretation of escaped characters that are backslashed.
Using option ‘\n‘ – New line with backspace interpretor ‘-e‘ treats new line from where it is used.
Comments
Post a Comment