The awk programming language (1988) [pdf] _ hacker news

.

Thanks for publishing it. Venezuela money to us dollars I had long thought about writing a compiler in Awk. Asian stock market futures Finding yours through a comment here on HN some time ago served as a major validation of the idea. Binary to english translator I ended up writing one.

Here is the result: https://github.com/dbohdan/all-caps-basic. Hex editor windows 10 It targets C and uses libgc along with antirez’s sds for strings. Rate gbp to usd The multi-pass design with each pass consuming and producing text is intended to make the intermediate results easy to inspect, making the compiler a kind of working model. Javascript print command The passes are also meant to be replaceable, so you could theoretically replace the C dependencies with something else or generate native code directly in Awk. Binary music You can see some code examples in test/. 1 usd to krw Unfortunately, the compiler is very incomplete. Usd nzd chart I mean to come back to it at least to publish an implementation of arrays.

One of my commonly used Unix one-liners, using awk, is to get the sum of the file sizes for the files listed by the ls command (with the -R for recursive option if wanted):

$5 is the 5th field of the output, which is the file size field in the case of ls output. Dollar euro exchange rate today The code inside the first set of braces runs once for every line of input (which comes from standard input, so from the ls command, in this case), and the code inside the second set of braces runs at the end of the input, calculating and printing the desired result of the total of all file sizes for files found by ls, in kilobytes. The fx firm It can easily be changed to output the total in bytes or megabytes by dropping the ‘/ 1024’ or adding another one after the first.


Binary code translater Variable s is initialized to 0 by default at the start.

You can get similar info with “du -hs /path/to/dir” but the ls plus awk pipeline lends itself to more customization, such as adding conditions for the type or owner of the file, etc.

PolyAWK (by Polytron), which included a copy of this book with each unit sold (see sticker on the cover of the linked PDF), was a _favorite_ tool of mine “back in the DOS (and early Windows) days”. Html code reader It was IIRC developed by Thompson Automation Software[0], who later sold the software package directly. 1 usd to bgn The Thompson Automation Awk package included an awesome _awk compiler_, allowing creation of standalone .EXE files (using a 32-bit DOS extender, and later a Win32 version) from 1+ awk source files. Usd brl exchange rate The compiler presumably generated bytecode which was bundled into the .EXE file along with a 32-bit runtime which provided data capacity sufficient for a wide range of real-world projects. Funny quotes about friendship Anyway, TAWK gave me a huge productivity boost for a number of years during a time when such languages were only beginning to become available on the PC platform. Yahoo news canada And the ability to create single-file standalone EXE files greatly eased distribution of the tools I created. Us futures market hours Good times.

All materials are found on open spaces of a network the Internet as freely extended and laid out exclusively in the fact-finding purposes. If you are what lawful legal owner or a product and against its placing on the given site, inform us and we will immediately remove the given material. The administration of a site does not bear responsibility for actions of the visitors breaking copyrights. abuzesite@bigmir.net

banner