Results for “Input streams & redirection”
Small, practical examples. Search by task or narrow things down below.
Update an object with a readonly input
Create a changed copy while retaining the original.
readonly✓ Tested
Validate a complete floating-point input
C: strtod exposes both the stopping position and range errors; reject nonfinite results when required.
C✓ Tested
Validate an email input
Use browser constraint validation for a required HTML email field.
HTML✓ Tested
Count whitespace-separated words
Linux Commands: Use wc -w with standard input to omit the filename column.
Linux Commands✓ Tested
Save a stream while displaying it
Linux Commands: Use tee to write a copy of standard input to a file.
Linux Commands✓ Tested
Allow several selected options
HTML: A multiple select exposes each selected option as a value with the same control name.
HTML✓ Tested
Append a stream to a log file
Linux Commands: Use tee -a to preserve existing log contents.
Linux Commands✓ Tested
Count bytes in a file
Linux Commands: Use wc -c for byte length rather than Unicode character count.
Linux Commands✓ Tested
Encode and decode a file with Base64
Linux Commands: Use GNU base64 for text transport of bytes and --decode for the reverse operation.
Linux Commands✓ Tested
Inspect bytes as hexadecimal values
Linux Commands: Use od with explicit formatting and no address column.
Linux Commands✓ Tested
Limit typed text to a maximum length
HTML: Maxlength limits ordinary user editing without replacing server-side validation.
HTML✓ Tested
Read a button with the internal pull-up
Treat a grounded input as a pressed button.
INPUT_PULLUP✓ Tested