You are given a small text stream in a file /app/input.txt. Your task is to build a tiny processor that keeps only characters that belong to the A-@ range (as described below) and newline characters, then outputs the first 64 characters of the filtered stream to /app/output.txt.
Definitions:
Allowed characters: the characters that match the POSIX character class [A-@] plus newline. If you implement in a language that uses a different syntax, implement the same set of characters: the ones included in [A-@] and newline.
Deliverables:
A runnable script or binary that reads /app/input.txt, applies the filter, and writes exactly 64 characters to /app/output.txt. Counting includes newline characters.
Implementation tips:
You may choose any language (bash, Python, etc.). Keep the output deterministic and avoid extra whitespace.
If the filtered content has fewer than 64 characters, pad the output on the right with spaces to reach 64 characters.
How to run:
The grader will execute your solution and verify /app/output.txt contents.
Ensure the script is present in the container's PATH or invoked directly.
Notes:
The environment contains /app/input.txt and may contain any characters. Your script must sanitize properly.