From c9122d382941cf61a98894ee0e48de56e20c690b Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 2 Feb 2024 08:17:28 -0800 Subject: [PATCH] Add missing try.sh to 1992/gson/README.md --- 1992/gson/README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/1992/gson/README.md b/1992/gson/README.md index 6602f4e84..6d23d86a7 100644 --- a/1992/gson/README.md +++ b/1992/gson/README.md @@ -28,8 +28,13 @@ For more detailed information see [1992 gson in bugs.md](/bugs.md#1992-gson). ## Try: -Determine where your system dictionary is located. You may find -it located in one of the following places: +```sh +./try.sh +``` + +This script will determine (or try and determine) where your system dictionary +is located and assuming that it can find one it'll use that. It checks the +following locations though the last one is more ironic: ``` /usr/share/dict/words @@ -38,7 +43,7 @@ it located in one of the following places: /dev/null # <-- for machines with nothing to say ``` -Then using the proper dictionary: +Then using the proper dictionary file it does: ```sh ./ag free software foundation < /usr/share/dict/words @@ -50,6 +55,14 @@ Then using the proper dictionary: ./ag paul e tsongas < /usr/share/dict/words ``` +where `/usr/share/dict/words` is the dictionary file. + +Then it uses the [mkdict.sh](mkdict.sh) script to create a dictionary file out +of the files [README.md](README.md), [try.sh](try.sh) (itself) and +[Makefile](Makefile) and it repeats the same commands as above. In the case no +dictionary file can be found in the first step it only runs the commands once +with the created dictionary file. + ## Judges' remarks: