diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-16 22:41:09 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-06-16 22:41:09 +0100 |
commit | 7e8098139f1e8cb2346e9ad3c1787af193d8fea5 (patch) | |
tree | dac868ca742815ddce4aeac8a212fc1c0a68e1c0 | |
parent | 2a787ccb7b9c28097a678f50da05102bc9fb74a4 (diff) |
Using type to see if pdftotext exists or not
Until now we were using 'which' for this job, but throughout Maneage, we
have used 'type', so to help in consistancy, we also use 'type' for this
final command for this project also.
-rwxr-xr-x | project | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -416,7 +416,7 @@ EOF # example when running './project make clean' there isn't any # 'paper.pdf'). if [ -f paper.pdf ]; then - if which pdftotext &> /dev/null; then + if type pdftotext > /dev/null 2>/dev/null; then numwords=$(pdftotext paper.pdf && cat paper.txt | wc -w) echo; echo "Number of words in full PDF: $numwords" rm paper.txt |