Skip to content

Commit 9300b2f

Browse files
committed
Merge pull request #4 from sleepypikachu/master
Replaced backticked command substitutions with dollar brackets
2 parents d47cba7 + 3fc7c93 commit 9300b2f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spaceman-diff

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ perDiffWidth=$(expr $screenWidthMinusBuffer / 2)
3030
fileA=$2
3131
fileB=$5
3232

33-
filenameA=`basename $1`
33+
filenameA=$(basename $1)
3434
extA=${filenameA##*.}
35-
filenameB=`basename $5`
35+
filenameB=$(basename $5)
3636
extB=${filenameB##*.}
3737

3838
# Header row
@@ -55,14 +55,14 @@ printf "$(yes " " | head -n$sideBySideBuffer | tr -d '\n')"
5555
printf "$(yes "" | head -n$perDiffWidth | tr -d '\n')"
5656
echo
5757

58-
outputA=`convert $fileA jpg:- | jp2a --color --width=$perDiffWidth -`
59-
outputB=`convert $fileB jpg:- | jp2a --color --width=$perDiffWidth -`
58+
outputA=$(convert $fileA jpg:- | jp2a --color --width=$perDiffWidth -)
59+
outputB=$(convert $fileB jpg:- | jp2a --color --width=$perDiffWidth -)
6060

61-
heightA=`echo "$outputA" | wc -l | xargs`
62-
heightB=`echo "$outputB" | wc -l | xargs`
63-
max=`echo "$heightA\n$heightB" | sort -nr | head -n1`
61+
heightA=$(echo "$outputA" | wc -l | xargs)
62+
heightB=$(echo "$outputB" | wc -l | xargs)
63+
max=$(echo "$heightA\n$heightB" | sort -nr | head -n1)
6464

65-
for i in `seq 1 $max`
65+
for i in $(seq 1 $max)
6666
do
6767
A=$(echo "$outputA" | sed -n ${i}p)
6868
B=$(echo "$outputB" | sed -n ${i}p)

0 commit comments

Comments
 (0)