sudo apt-get install winbind
WINEPREFIX=/home/<username>/.wine-<myprefix> WINEARCH=win32 wine 'wineboot'
| echo "syntax for base conversion in bash is: \$((\$BASE#\$VALUE))" | |
| echo | |
| echo "Decimal value of Hexadecimal 2B: \$((16#2B))" | |
| echo $((16#2B)) | |
| echo | |
| echo "Decimal value of binary 0110: \$((2#0110))" | |
| echo $((2#0110)) | |
| echo |
| # trick is to match on a non-printing character (^ is beginning of line) OR your pattern. | |
| # this way all lines match but only your pattern containing printable characters will be highlighted | |
| # using ^ requires Extended-Regexp option (-E) | |
| grep -E '^|pattern' file.log |
| exec su -l $USER |
| kill -0 $(ps -eo pid,command | grep nginx | grep master | awk -F ' ' '{print $1}') |
| # default nice value seems fine in my case; ionice has no default, using class 3 for idle IO time | |
| ionice -c 3 nice tar ~/the-webapp-20150106.tgz /opt/the-webapp |
| host $(host $THE_DNSNAME | awk -F ' ' '{print $4}') |
| ssh user@host 'bash -s' < /path/to/my-script.sh |
| ip addr show | grep 'inet ' | grep -v -E 'lo$' | awk -F ' ' '{print $NF, "\t", $2}' |
| # view MBR with partition table | |
| sudo dd if=/dev/sda bs=512 count=1 | hexdump -C | |
| # backup MBR without partition table | |
| sudo dd if=/dev/sda of=mbr.backup bs=446 count=1 |