Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using bash builtin instead of external commands

* test, [ are limited commands, [[ is built in
** http://mywiki.wooledge.org/BashFAQ/031
  • Loading branch information...
commit ad65e9f1d888b639440f4e93b950f5c857cb5176 1 parent 6b9a022
@bahamas10 bahamas10 authored committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 bin/mad
View
6 bin/mad
@@ -41,8 +41,8 @@ display() {
for path in $paths; do
local file=$path/$page
local ext=$path/$page.md
- test -f $file && display_file $file
- test -f $ext && display_file $ext
+ [[ -f "$file" ]] && display_file $file
+ [[ -f "$ext" ]] && display_file $ext
done
echo
@@ -138,7 +138,7 @@ install_mad() {
# file required
-test $# -eq 0 && display_mad_usage
+[[ -z "$1" ]] && display_mad_usage
# parse args
Please sign in to comment.
Something went wrong with that request. Please try again.