mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-02-22 00:30:40 +01:00
bashrc & zshrc: use $() instead of ``. Closes #30 .
This commit is contained in:
parent
728c90529e
commit
38a58a954e
16
bashrc
16
bashrc
@ -1,4 +1,4 @@
|
||||
UNAME=`uname`
|
||||
UNAME=$(uname)
|
||||
# TOC
|
||||
# Defaults etc... M0TZLS
|
||||
# Environment 7RS56S
|
||||
@ -230,8 +230,8 @@ export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||
|
||||
# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname"
|
||||
UNAME=`uname`
|
||||
CPUARCH=`uname -p`
|
||||
UNAME=$(uname)
|
||||
CPUARCH=$(uname -p)
|
||||
|
||||
# If we are on Linux, enable apt progress bar and colours
|
||||
if [[ $USER = "root" ]]; then
|
||||
@ -255,9 +255,9 @@ export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||
|
||||
# make
|
||||
if [[ $UNAME != Darwin ]]; then
|
||||
export NPROC=`nproc`
|
||||
export NPROC=$(nproc)
|
||||
else
|
||||
export NPROC=`sysctl -n hw.ncpu`
|
||||
export NPROC=$(sysctl -n hw.ncpu)
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
# 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-pub="ssh-add -L"
|
||||
|
||||
@ -572,7 +572,7 @@ function downforme() {
|
||||
then
|
||||
echo -e "${YELLOW}usage:${NC} downforme website_url"
|
||||
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 ]
|
||||
then
|
||||
echo -e "${RED}It's just you. \n${NC}$1 is up."
|
||||
@ -700,7 +700,7 @@ cd
|
||||
|
||||
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"
|
||||
|
||||
echo "I am now changing directory to /etc/apt/."
|
||||
|
16
zshrc
16
zshrc
@ -1,4 +1,3 @@
|
||||
UNAME=`uname`
|
||||
# TOC
|
||||
# Defaults etc... M0TZLS
|
||||
# Environment 7RS56S
|
||||
@ -6,7 +5,7 @@ UNAME=`uname`
|
||||
# Functions ZGC5QQ
|
||||
|
||||
# uname should be readable in $uname
|
||||
uname=`uname`
|
||||
uname=$(uname)
|
||||
|
||||
# enable terminal bell
|
||||
|
||||
@ -166,8 +165,7 @@ export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||
|
||||
# Sets environment variable CPUARCH to output of "uname -p" and UNAME to "uname"
|
||||
CPUARCH=`uname -p`
|
||||
UNAME=`uname`
|
||||
CPUARCH=$(uname -p)
|
||||
|
||||
# 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
|
||||
@ -191,9 +189,9 @@ export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||
|
||||
# make
|
||||
if [[ $UNAME != Darwin ]]; then
|
||||
export NPROC=`nproc`
|
||||
export NPROC=$(nproc)
|
||||
else
|
||||
export NPROC=`sysctl -n hw.ncpu`
|
||||
export NPROC=$(sysctl -n hw.ncpu)
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
# 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-pub="ssh-add -L"
|
||||
|
||||
@ -543,7 +541,7 @@ function downforme() {
|
||||
then
|
||||
echo -e "${YELLOW}usage:${NC} downforme website_url"
|
||||
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 ]
|
||||
then
|
||||
echo -e "${RED}It's just you. \n${NC}$1 is up."
|
||||
@ -671,7 +669,7 @@ cd
|
||||
|
||||
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"
|
||||
|
||||
echo "I am now changing directory to /etc/apt/."
|
||||
|
Loading…
x
Reference in New Issue
Block a user