unix man

$() means: "first evaluate this, and then evaluate the rest of the line".

Ex :

echo $(pwd)/myFile.txt
will be interpreted as

echo /my/path/myFile.txt
On the other hand ${} expands a variable.

Ex:

MY_VAR=toto
echo ${MY_VAR}/myFile.txt
will be interpreted as

echo toto/myFile.txt


sudo -i is the way to go if you don't want to be typing a password every 10 mins while doing modifications in your system (or other systems), and you don't want to modify any system files.

It will switch you to root using your sudo user password, when you close the console or type exit you are back to your normal user.
src: https://askubuntu.com/questions/147241/execute-sudo-without-password

Комментарии

Популярные сообщения из этого блога

kafka конспект однако

Дэвид Рок: Ваш мозг на работе - Разговоры в Гугле

Отслеживание Процесса загрузки с PHP и JavaScript