bashrc & zshrc: use $() instead of ``. Closes #30 .

This commit is contained in:
Mikaela Suomalainen 2014-05-22 11:31:14 +03:00
parent 728c90529e
commit 38a58a954e
2 changed files with 15 additions and 17 deletions

16
bashrc
View File

@ -1,4 +1,4 @@
UNAME=`uname` UNAME=$(uname)
# TOC # TOC
# Defaults etc... M0TZLS # Defaults etc... M0TZLS
# Environment 7RS56S # Environment 7RS56S
@ -230,8 +230,8 @@ export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m' export LESS_TERMCAP_us=$'\E[01;32m'
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname" # Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
UNAME=`uname` UNAME=$(uname)
CPUARCH=`uname -p` CPUARCH=$(uname -p)
# If we are on Linux, enable apt progress bar and colours # If we are on Linux, enable apt progress bar and colours
if [[ $USER = "root" ]]; then if [[ $USER = "root" ]]; then
@ -255,9 +255,9 @@ export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# make # make
if [[ $UNAME != Darwin ]]; then if [[ $UNAME != Darwin ]]; then
export NPROC=`nproc` export NPROC=$(nproc)
else else
export NPROC=`sysctl -n hw.ncpu` export NPROC=$(sysctl -n hw.ncpu)
fi fi
export MAKEFLAGS="-j$NPROC" export MAKEFLAGS="-j$NPROC"
@ -509,7 +509,7 @@ alias inxi-install-root="cd /usr/local/bin;\wget -Nc smxi.org/inxi;chmod +x inxi
alias inxi-update="inxi -U" alias inxi-update="inxi -U"
# FINEID # FINEID
pkcs11so=`find /usr/*lib -name 'opensc-pkcs11.so' 2>/dev/null` pkcs11so=$(find /usr/*lib -name 'opensc-pkcs11.so' 2>/dev/null)
alias ssh-add-sc="ssh-add -s $opensc-pkcs11.so" alias ssh-add-sc="ssh-add -s $opensc-pkcs11.so"
alias ssh-add-sc-pub="ssh-add -L" alias ssh-add-sc-pub="ssh-add -L"
@ -572,7 +572,7 @@ function downforme() {
then then
echo -e "${YELLOW}usage:${NC} downforme website_url" echo -e "${YELLOW}usage:${NC} downforme website_url"
else else
JUSTYOUARRAY=(`lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"`) JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"))
if [ ${#JUSTYOUARRAY} != 0 ] if [ ${#JUSTYOUARRAY} != 0 ]
then then
echo -e "${RED}It's just you. \n${NC}$1 is up." echo -e "${RED}It's just you. \n${NC}$1 is up."
@ -700,7 +700,7 @@ cd
function ubuntu-sources-list-install { function ubuntu-sources-list-install {
export RELEASE=`lsb_release -sr` export RELEASE=$(lsb_release -sr)
a[1]="http://mkaysi.github.io/shell-things/sources.list/$RELEASE" a[1]="http://mkaysi.github.io/shell-things/sources.list/$RELEASE"
echo "I am now changing directory to /etc/apt/." echo "I am now changing directory to /etc/apt/."

16
zshrc
View File

@ -1,4 +1,3 @@
UNAME=`uname`
# TOC # TOC
# Defaults etc... M0TZLS # Defaults etc... M0TZLS
# Environment 7RS56S # Environment 7RS56S
@ -6,7 +5,7 @@ UNAME=`uname`
# Functions ZGC5QQ # Functions ZGC5QQ
# uname should be readable in $uname # uname should be readable in $uname
uname=`uname` uname=$(uname)
# enable terminal bell # enable terminal bell
@ -166,8 +165,7 @@ export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m' export LESS_TERMCAP_us=$'\E[01;32m'
# Sets environment variable CPUARCH to output of "uname -p" and UNAME to "uname" # Sets environment variable CPUARCH to output of "uname -p" and UNAME to "uname"
CPUARCH=`uname -p` CPUARCH=$(uname -p)
UNAME=`uname`
# Copied from http://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/ # Copied from http://homepages.see.leeds.ac.uk/~eeaol/notes/2012/03/how_to_only_type_ssh_passphrase_once/
export SSH_AUTH_SOCK=/tmp/$USER.agent export SSH_AUTH_SOCK=/tmp/$USER.agent
@ -191,9 +189,9 @@ export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# make # make
if [[ $UNAME != Darwin ]]; then if [[ $UNAME != Darwin ]]; then
export NPROC=`nproc` export NPROC=$(nproc)
else else
export NPROC=`sysctl -n hw.ncpu` export NPROC=$(sysctl -n hw.ncpu)
fi fi
export MAKEFLAGS="-j$NPROC" export MAKEFLAGS="-j$NPROC"
@ -482,7 +480,7 @@ alias inxi-install-root="cd /usr/local/bin;\wget -Nc smxi.org/inxi;chmod +x inxi
alias inxi-update="inxi -U" alias inxi-update="inxi -U"
# FINEID # FINEID
pkcs11so=`find /usr/*lib -name 'opensc-pkcs11.so' 2>/dev/null` pkcs11so=$(find /usr/*lib -name 'opensc-pkcs11.so' 2>/dev/null)
alias ssh-add-sc="ssh-add -s $pkcs11so" alias ssh-add-sc="ssh-add -s $pkcs11so"
alias ssh-add-sc-pub="ssh-add -L" alias ssh-add-sc-pub="ssh-add -L"
@ -543,7 +541,7 @@ function downforme() {
then then
echo -e "${YELLOW}usage:${NC} downforme website_url" echo -e "${YELLOW}usage:${NC} downforme website_url"
else else
JUSTYOUARRAY=(`lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"`) JUSTYOUARRAY=($(lynx -dump http://downforeveryoneorjustme.com/$1 | grep -o "It's just you"))
if [ ${#JUSTYOUARRAY} != 0 ] if [ ${#JUSTYOUARRAY} != 0 ]
then then
echo -e "${RED}It's just you. \n${NC}$1 is up." echo -e "${RED}It's just you. \n${NC}$1 is up."
@ -671,7 +669,7 @@ cd
function ubuntu-sources-list-install { function ubuntu-sources-list-install {
export RELEASE=`lsb_release -sr` export RELEASE=$(lsb_release -sr)
a[1]="http://mkaysi.github.io/shell-things/sources.list/$RELEASE" a[1]="http://mkaysi.github.io/shell-things/sources.list/$RELEASE"
echo "I am now changing directory to /etc/apt/." echo "I am now changing directory to /etc/apt/."