FIND YOUR NEXT FEW LINES

Results for “print”

Small, practical examples. Search by task or narrow things down below.

73 snippets foundClear filters
TypeScriptGetting Started

Print a number with two decimal places

TypeScript: Format a small decimal value consistently for display.

TypeScript✓ Tested
C++Getting Started

Print a number with two decimal places

C++: Format a small decimal value consistently for display.

C++✓ Tested
CGetting Started

Print a number with two decimal places

C: Format a small decimal value consistently for display.

C✓ Tested
Linux CommandsTransforming text

Print a selected range of lines

Linux Commands: Use sed -n with a line address to suppress other output.

Linux Commands✓ Tested
Arduino / CGetting Started

Print a single character

Arduino / C: Print a single character on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Arduino / CSerial communication

Print integers in different bases

Inspect a byte in decimal, hexadecimal, and binary.

Serial✓ Tested
Arduino / CGetting Started

Print once from setup

Arduino / C: Print once from setup on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Linux CommandsSorting & joining records

Print only duplicate values

Linux Commands: Use uniq -d after sorting to report each repeated value once.

Linux Commands✓ Tested
Linux CommandsSearching text

Print only the matching portions

Linux Commands: Use extended regex and -o to extract digit sequences.

Linux Commands✓ Tested
Linux CommandsGetting Started

Print separate arguments safely

Linux Commands: Print separate arguments safely using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Bash ScriptsText parsing & arithmetic

Print text containing percent characters literally

Bash Scripts: Never use untrusted text as the printf format string.

Bash Scripts✓ Tested
Linux CommandsTransforming text

Print the final lines of a file

Linux Commands: Use tail -n for a fixed-size suffix of a log.

Linux Commands✓ Tested