Improve 2015/burton/try.sh
The thanks file was updated slightly but it still needs some work. This will have to happen another time.
This commit is contained in:
1 parent
4210888212
commit
e494259c75
2 files changed
+32
-21
No files matched your search
+29
-18
@@ -15,41 +15,52 @@ make CC="$CC" all >/dev/null || exit 1
|
|||||||
# clear screen after compilation so that only the entry is shown
|
# clear screen after compilation so that only the entry is shown
|
||||||
clear
|
clear
|
||||||
|
|
||||||
echo "$ ./calc '?0x3343<<2'" 1>&2
|
read -r -n 1 -p "Press any key to run: ./calc '?0x3343<<2': "
|
||||||
|
echo 1>&2
|
||||||
./calc '?0x3343<<2'
|
./calc '?0x3343<<2'
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
echo "$ echo '?0x3343<<2' | ./ecalc" 1>&2
|
read -r -n 1 -p "Press any key to run: echo '?0x3343<<2' | ./ecalc: "
|
||||||
|
echo 1>&2
|
||||||
echo '?0x3343<<2' | ./ecalc
|
echo '?0x3343<<2' | ./ecalc
|
||||||
|
|
||||||
|
|
||||||
echo "$ grep '[0-9]' prog.c" 1>&2
|
|
||||||
read -r -n 1 -p "Press any key to continue (notice how there are no digits!): "
|
|
||||||
echo 1>&2
|
|
||||||
grep -c '[0-9]' prog.c
|
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to run: ./calc < test.in: "
|
|
||||||
echo 1>&2
|
|
||||||
./calc < test.in
|
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to show try.this.txt: "
|
|
||||||
|
read -r -n 1 -p "Press any key to run: grep '[0-9]' prog.c || echo \"no digits in prog.c!\": "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
cat try.this.txt
|
grep -q '[0-9]' prog.c || echo "no digits in prog.c!"
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to show calc.in (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
less -rEXFK test.in
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./calc < test.in (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./calc < test.in | less -rEXFK
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to show try.this.txt (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
less -rEXFK try.this.txt
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to run: ./calc < try.this.txt: "
|
read -r -n 1 -p "Press any key to run: ./calc < try.this.txt: "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
./calc < try.this.txt
|
./calc < try.this.txt
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to show the hex value of 42: "
|
read -r -n 1 -p "Press any key to run: ./calc 42 # show hex value of 42: "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
echo "$ ./calc 42" 1>&2
|
|
||||||
./calc 42
|
./calc 42
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to run: ./calc '1<<22-1' (show mask value for 22 bits): "
|
read -r -n 1 -p "Press any key to run: ./calc '1<<22-1' # show mask value for 22 bits: "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
./calc '1<<22-1'
|
./calc '1<<22-1'
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
read -r -n 1 -p "Press any key to run: ./calc ?0x11223344 (byte-swapped value of 0x11223344): "
|
read -r -n 1 -p "Press any key to run: ./calc ?0x11223344 # byte-swapped value of 0x11223344: "
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
./calc ?0x11223344
|
./calc ?0x11223344
|
||||||
|
echo 1>&2
|
||||||
+3
-3
@@ -4229,9 +4229,9 @@ This was done for both the [prog.c](/2015/burton/prog.c) and
|
|||||||
[prog.alt.c](/2015/burton/prog.alt.c). The Makefile was also updated to build
|
[prog.alt.c](/2015/burton/prog.alt.c). The Makefile was also updated to build
|
||||||
`eprog` and `eprog.alt` to make use of the feature more easily. Each is a new
|
`eprog` and `eprog.alt` to make use of the feature more easily. Each is a new
|
||||||
target (first in `TARGET` and second in `ALT_TARGET`) which have a prerequisite
|
target (first in `TARGET` and second in `ALT_TARGET`) which have a prerequisite
|
||||||
of `${PROG}` and `${PROG}.alt` respectively and which copies `prog` and
|
of `${PROG}` and `${PROG}.alt` respectively both of which also copy the `prog`
|
||||||
`prog.alt` to `eprog` and `eprog.alt` respectively. With these changes now one
|
(`prog` or `eprog`) to the respective `eprog` (`eprog` or `eprog.alt`). With
|
||||||
can easily use the echo feature the author implemented.
|
these changes now one can easily use the echo feature the author implemented.
|
||||||
|
|
||||||
Cody also added the [try.sh](/2015/burton/try.sh) script. This involved
|
Cody also added the [try.sh](/2015/burton/try.sh) script. This involved
|
||||||
adding a text file, [try.this.txt](/2015/burton/try.this.txt).
|
adding a text file, [try.this.txt](/2015/burton/try.this.txt).
|
||||||
|
|||||||
Reference in new issue
Block a user