Title here
Summary here
Our line filter program reads input from stdin, processes it, and then prints a derived result to stdout. In this case, it writes a capitalized version of all input text. You can use this pattern to write your own Julia line filters.
To try out our line filter, first make a file with a few lowercase lines.
Then use the line filter to get uppercase lines.
In this Julia version:
stdin
for input, which is already buffered in Julia.eachline
function provides an iterator over the lines of input.uppercase
to convert each line to uppercase.println
is used to write the uppercased line to stdout.Julia’s standard library provides high-level constructs that make this kind of text processing straightforward and efficient.