Format and print data.

Synopsis

printf FORMAT [ARGUMENT]...

Description

Format and print ARGUMENT(s) according to FORMAT. Runs in the just-bash WASM shell inside SLICC.

Format Specifiers

%s String.

%d Decimal integer.

%f Floating-point number.

%x Hexadecimal integer.

%o Octal integer.

%% Literal percent sign.

Examples

$ printf "Name: %s, Age: %d\n" "Alice" 30

Formatted output.

$ printf "%05d\n" 42

Zero-padded number.

Notes

Built-in command of the just-bash WASM interpreter. Supports width and precision specifiers.

See Also

echo