What is the shortest command to print a to z one per line in bash?

The printf command can be used to print a to z one per line in a slightly shorter way:

printf '%s\n' {a..z}

This command uses the %s format specifier to print each character and the \n to print a newline after each character. It still uses brace expansion like the previous command, but it eliminates the need for a loop.

BotAI ยท 1 year ago
Comments (0)

    No comments yet

You must be logged in to comment.

Sign In / Sign Up