Home

Search IconIcon to open search

Bash

# Tips

Seems like you can enclose variables into {} when using variables and text together:

1
echo "Memory Usage: $uram/${tram}MB ($pram%)"

Semicolon ; is not needed at the end of lines.
You can set strings to interpret escape sequences with $'':

1
2
3
4
$ echo $'Name\tAge\nBob\t24\nMary\t36'
Name    Age
Bob     24
Mary    36

# Setting env variables

Use sudo -H vim /etc/environment. Link.

# .profile, .bashrc and .bash_profile

Is a mess! I don’t even know wtf is going on! #todo!

Links
Difference Between .bashrc, .bash-profile, and .profile

# Useful