Results for “Dates & process utilities”
Small, practical examples. Search by task or narrow things down below.
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Check the integrity of a gzip stream
Linux Commands: Use gzip -t to verify a compressed file without extracting it.
Linux Commands✓ Tested
Check whether a file is already sorted
Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.
Linux Commands✓ Tested
Check whether text is valid JSON
Reject malformed input before processing it.
json_valid✓ Tested
Check whether two practice files match
Linux Commands: Check whether two practice files match using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Collapse repeated spaces
Linux Commands: Use tr -s when repeated occurrences of a character should become one.
Linux Commands✓ Tested
Commit multiple related changes together
SQL: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQL✓ Tested
Commit multiple related changes together
SQL Server: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQL Server✓ Tested
Commit multiple related changes together
Postgres: The first transaction prepares the fixtures. The second commits both updates as one unit.
Postgres✓ Tested
Commit multiple related changes together
SQLite: The first transaction prepares the fixtures. The second commits both updates as one unit.
SQLite✓ Tested
Compress a stream to a chosen filename
Linux Commands: Use gzip -c to leave the source file untouched and choose the destination explicitly.
Linux Commands✓ Tested
Convert tab stops to spaces
Linux Commands: Use expand with a fixed tab width when preparing plain-text alignment.
Linux Commands✓ Tested