Skip to content

Commit 6a52103

Browse files
author
Christopher M. Neill
committed
because rsandor is pedantic
1 parent bbb1902 commit 6a52103

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ansible/roles/bash_aliases/templates/dot_bash_aliases.sh.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ logpath() {
1010

1111
logtail() {
1212
local app_name="$1"
13-
tail -f $(logpath ${app_name}) | bunyan
13+
tail -f "$(logpath ${app_name})" | bunyan
1414
}
1515

1616
# Follows the logfile for a given app_name interpolating the datetime string into the logpath (/var/log/runnable/YYYY/MM/DD/HH/<app_name>.log)
1717
# Usage: lograw <app_name>
1818
lograw() {
1919
local app_name="$1"
20-
tail -f $(logpath ${app_name})
20+
tail -f "$(logpath ${app_name})"
2121
}
2222

2323
# Just display the last few lines of a log (2nd arg specifies # of lines or tail default if left blank)
@@ -29,7 +29,7 @@ loglast() {
2929
if [ 2 -eq "{{ '${#}' }}" ] ; then
3030
tailopts="-${2}"
3131
fi
32-
tail ${tailopts} $(logpath ${app_name}) | bunyan
32+
tail "${tailopts}" "$(logpath ${app_name})" | bunyan
3333
}
3434

3535
# Follow a log, grep for "${regexp}"
@@ -41,11 +41,11 @@ greplog() {
4141
if [ 2 -eq "{{ '${#}' }}" ] ; then
4242
regexp="${2}"
4343
fi
44-
tail -f $(logpath ${app_name}) | grep ${regexp} | bunyan
44+
tail -f "$(logpath ${app_name})" | grep "${regexp}" | bunyan
4545
}
4646

4747
# Outputs contents of an npm start log for <app_name>, if it exists, into a pager for reading.
4848
# Usage: npmlog <app_name>
4949
npmlog() {
50-
less $(logpath ${app_name})
50+
less "$(logpath ${app_name})"
5151
}

0 commit comments

Comments
 (0)