Linux parentheses vs braces #shorts #scripting #linux #bash #bashscripting

preview_player
Показать описание
Parentheses vs braces does different task in linux.
() Parentheses is used for command.
{} Curly braces is used for displaying variables value or used for string manipulating.
Рекомендации по теме
Комментарии
Автор

You don't need to prefix you command with a $ sign. "echo (date)" works fine.
Neither you need to pack your variable with {}. "echo $a" is sufficient.
The curly braces are more used for parameter substitutions. I use it often with syntax like "echo file{1, 2, 3}.txt"

makidoko
join shbcf.ru