Skip to content

shortest possible awk program ? #1

@mogando668

Description

@mogando668

the absolute shortest program i can think of is

awk ''

that depends on whether blocking everything through the inputs and pipe counts as "doing stuff"" or not. to make it print without any formatting*

awk 1

it's a *caveat cuz it still will pad in the ORS regardless of input, so if the input lacks a trailing new line, this would inadvertently added extra stuff in.

if you wanna make it weirdo and fun looking without typing numbers or risking exposing exclamation mark (!) in console, then do

awk _^_

that's just zero to zero-th power, 0**0=1, so it's identical to the previous program.

and if you wanna do row-de-duping, but too lazy to do proper shell-quoting, then it's

awk _^__[\$_]++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions