Skip to content

Commit 6b5e375

Browse files
author
Your Name
committed
oeis: code style, quotation mark consistency
1 parent 9c63751 commit 6b5e375

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

share/adapters/oeis.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,22 @@ oeis() (
7272
if [[ ${LANGUAGE^^} == ':LIST' ]]
7373
then
7474
rm -f ${TMP}/list
75-
grep -q 'MAPLE' $DOC && printf "maple\n" >> $TMP/list
76-
grep -q 'MATHEMATICA' $DOC && printf "mathematica\n" >> $TMP/list
77-
parse_code "PROG.*CROSSREFS" \
75+
grep -q 'MAPLE' $DOC && printf 'maple\n' >> $TMP/list
76+
grep -q 'MATHEMATICA' $DOC && printf 'mathematica\n' >> $TMP/list
77+
parse_code 'PROG.*CROSSREFS' \
7878
| grep -o '^(.*)' \
7979
| sed 's/ .*//g' \
8080
| tr -d '()' \
8181
| sort -u >> $TMP/list
82-
[ $(wc -c < $TMP/list) -ne 0 ] && cat ${TMP}/list || printf "No code snippets available.\n"
83-
cat $TMP/list
82+
[ $(wc -c < $TMP/list) -ne 0 ] && cat ${TMP}/list || printf 'No code snippets available.\n'
8483
return 0
8584
fi
8685
# Print ID, description, and sequence
8786
printf "ID: ${ID}\n"
8887
get_desc
89-
printf "\n"
88+
printf '\n'
9089
get_seq ${MAX_TERMS}
91-
printf "\n"
90+
printf '\n'
9291
if [ $# -gt 1 ]
9392
then
9493
if [[ ${LANGUAGE^^} == 'MAPLE' ]] && grep -q 'MAPLE' $DOC
@@ -108,7 +107,7 @@ oeis() (
108107
> ${TMP}/code_snippet
109108
else
110109
# PROG section contains more code samples (Non Mathematica or Maple)
111-
parse_code "PROG.*CROSSREFS" \
110+
parse_code 'PROG.*CROSSREFS' \
112111
| sed '/PROG/d; /CROSSREFS/d' \
113112
> ${TMP}/prog
114113
# Print out code sample for specified language
@@ -150,7 +149,7 @@ oeis() (
150149
do
151150
printf "${ID[$i]}: ${DESC[$i]}\n"
152151
echo ${SEQ[$i]}
153-
printf "\n"
152+
printf '\n'
154153
done
155154
fi
156155
grep 'results, too many to show. Please refine your search.' /tmp/oeis/doc.html | sed -e 's/<[^>]*>//g; s/^[ \t]*//'

0 commit comments

Comments
 (0)