Improve 1995/garry try scripts
They now show the garry.data file and also show a bit more of what is being done (in the script). In the thanks file I removed the details as to why there are two scripts, one for the main version and one for the alt, as that was only there as at one point using environmental variables was the way it was being done, but that is no longer important or useful to know.
This commit is contained in:
1 parent
699e2f17fa
commit
78fdf606f2
4 files changed
+38
-17
No files matched your search
@@ -1,3 +1,6 @@
|
||||
|
||||
|
||||
|
||||
This is a short example to demonstrate the use of the garry program ...
|
||||
|
||||
Your Home-directory is $HOME$, while you search
|
||||
|
||||
+17
-6
@@ -19,12 +19,23 @@ echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\
|
||||
EXAMPLEON="\33\133\61\73\67\155"
|
||||
EXAMPLEOFF="\33\133\155"
|
||||
DOLLAR="$"
|
||||
echo "$ export EXAMPLEON EXAMPLEOFF DOLLAR" 1>&2
|
||||
export EXAMPLEON EXAMPLEOFF DOLLAR
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry.alt < garry.data | less (q = quit, space = next page): "
|
||||
|
||||
./garry.alt <garry.data | less -r -X
|
||||
echo 1>&2
|
||||
echo "As you continue with the script, consider why the above was necessary." 1>&2
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry.alt < README.md | less (q = quit, space = next page): "
|
||||
./garry.alt < README.md | less -X
|
||||
read -r -n 1 -p "Press any key to show garry.data (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF garry.data
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry.alt < garry.data | less (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
./garry.alt <garry.data | less -rEXF
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry.alt < README.md | less (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
./garry.alt < README.md | less -rEXF
|
||||
echo 1>&2
|
||||
+12
-3
@@ -20,12 +20,21 @@ echo "$ EXAMPLEON=\"\33\133\61\73\67\155\"; EXAMPLEOFF=\"\33\133\155\"; DOLLAR=\
|
||||
EXAMPLEON="\33\133\61\73\67\155"
|
||||
EXAMPLEOFF="\33\133\155"
|
||||
DOLLAR="$"
|
||||
echo "$ export EXAMPLEON EXAMPLEOFF DOLLAR" 1>&2
|
||||
export EXAMPLEON EXAMPLEOFF DOLLAR
|
||||
echo 1>&2
|
||||
echo "As you continue with the script, consider why the above was necessary." 1>&2
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry < garry.data | less (q = quit, space = next page): "
|
||||
read -r -n 1 -p "Press any key to show garry.data (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
less -rEXF garry.data
|
||||
echo 1>&2
|
||||
|
||||
./garry <garry.data | less -r -X
|
||||
read -r -n 1 -p "Press any key to run: ./garry < garry.data (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
./garry <garry.data | less -rEXF
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./garry < README.md | less (q = quit, space = next page): "
|
||||
./garry < README.md | less -X
|
||||
./garry < README.md | less -rEXF
|
||||
+6
-8
@@ -2042,14 +2042,12 @@ important that it works because the layout does indeed look to him like a rat is
|
||||
dropping core :-), something that the judges suggested.
|
||||
|
||||
Cody also renamed `garry.test.sh` to [try.sh](/1995/garrytry.sh) and improved it
|
||||
to to make sure the program is compiled before trying to use it and he also
|
||||
added the [try.alt.sh](/1995/garry/try.alt.sh) script to use the alt version,
|
||||
though the alt version is not as important as alt code in other entries.
|
||||
|
||||
The reason the alt script was added rather than using an environmental variable
|
||||
to specify which one to use is to make it easier on the user as typing
|
||||
`GARRY=garry.alt ./try.sh` is not as simple (even though simple) as just
|
||||
running `./try.alt.sh`.
|
||||
to to make sure the program is compiled before trying to use it as well as
|
||||
adding a few enhancements. For the alt version he also added the
|
||||
[try.alt.sh](/1995/garry/try.alt.sh) script to use the alt version, though the
|
||||
alt version is not as important as alt code in other entries. In order to get
|
||||
the paging to work right for the `garry.data` file leading blank lines had to be
|
||||
added.
|
||||
|
||||
|
||||
## <a name="1995_heathbar"></a>[1995/heathbar](/1995/heathbar/heathbar.c) ([README.md](/1995/heathbar/README.md]))
|
||||
|
||||
Reference in new issue
Block a user