Merge pull request #1362 from xexyl/garry-1995
This commit is contained in:
3 files changed
+21
-6
No files matched your search
@@ -64,7 +64,7 @@ This program is a file filter, designed to do environment-expansion and
|
||||
incorporating the ability to create binary from escaped data in the
|
||||
environment variables.
|
||||
|
||||
The calling syntax is pretty simple, just use it with stdio-redirection
|
||||
The calling syntax is pretty simple, just use it with `stdio`-redirection
|
||||
or inside pipelines, e.g.:
|
||||
|
||||
```sh
|
||||
@@ -79,10 +79,12 @@ cat all_my_files/* | ./garry | lp
|
||||
|
||||
The syntax of the conversion of the input file is as follows: To include the
|
||||
value of an environment variable in the output file, place the name of the
|
||||
variable between "$"-signs in the input, e.g.:
|
||||
variable between `$`-signs in the input, e.g.:
|
||||
|
||||
My Home-Directory is: $HOME$
|
||||
I'm using the path: $PATH$
|
||||
```
|
||||
My Home-Directory is: $HOME$
|
||||
I'm using the path: $PATH$
|
||||
```
|
||||
|
||||
Unknown Env-variables or malformed expressions are ignored and kept intact.
|
||||
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
# garry.alt.test.sh - example of how to use garry.alt
|
||||
|
||||
EXAMPLEON="\33\133\61\73\67\155"
|
||||
EXAMPLEOFF="\33\133\155"
|
||||
DOLLAR="$"
|
||||
export EXAMPLEON EXAMPLEOFF DOLLAR
|
||||
|
||||
# make sure alt code is built, first
|
||||
make alt || exit 1
|
||||
|
||||
./garry.alt <garry.data
|
||||
@@ -37,7 +37,7 @@ end, I made three critical observations:
|
||||
|
||||
1. If there's one thing computers are good at, it's math.
|
||||
2. Simple operations take less time than complicated ones.
|
||||
3. Every C program seems to contain the word "main".
|
||||
3. Every C program seems to contain the word `main`.
|
||||
|
||||
Based on #1, I knew that the Fastest Program had to be one that
|
||||
performed addition. From #2, I reasoned that it ought to directly
|
||||
@@ -46,7 +46,7 @@ high-level, fuzzy-logic, artificial-intelligence, neural-net,
|
||||
client-server, object-oriented abstractions like the C language "+"
|
||||
operator. And it was obvious from #3 that the program should
|
||||
resemble, as closely as possible, a long sequence of the familiar
|
||||
word "main" repeated over and over, so the computer would be
|
||||
word `main` repeated over and over, so the computer would be
|
||||
comfortable running the program and wouldn't get distracted dealing
|
||||
with unfamiliar variable names.
|
||||
|
||||
|
||||
Reference in new issue
Block a user