-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_functions
45 lines (40 loc) · 1.4 KB
/
.bash_functions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
############################################################################
# Function Library
#
#---------------------------------------------------------------------------
# zdate
#---------------------------------------------------------------------------
function zdate () {
date +"%Y-%m-%d-%H-%M-%S"
}
#---------------------------------------------------------------------------
# znotes
#---------------------------------------------------------------------------
function znotes () {
if [ -f "${HOME}/dotfiles/docs/index.md" ]; then
echo ""
cat ${HOME}/dotfiles/docs/*.md | less
echo ""
fi
}
#---------------------------------------------------------------------------
# zgzipr
#---------------------------------------------------------------------------
function zgzipr () {
find . -type f -name "$@" -exec gzip -9 {} \;
}
#---------------------------------------------------------------------------
# znetinfo
#---------------------------------------------------------------------------
function znetinfo () {
if [ `uname` == 'Linux' ]; then
echo "--------------- Network Information ---------------"
/sbin/ifconfig | awk /'inet addr/ {print $2}'
echo ""
/sbin/ifconfig | awk /'Bcast/ {print $3}'
echo ""
/sbin/ifconfig | awk /'inet addr/ {print $4}'
# /sbin/ifconfig | awk /'HWaddr/ {print $4,$5}'
echo "---------------------------------------------------"
fi
}