Results for “required”
Small, practical examples. Search by task or narrow things down below.
Enumerate matching files recursively
C#: Sort relative filenames when reproducible traversal output is required.
C#✓ Tested
Extract a compressed tar archive
Extract a trusted gzip-compressed tar archive into a dedicated destination directory.
tar✓ Tested
Extract numbers from text
Find all runs of ASCII digits in a string and convert the matches to integers.
regex✓ Tested
Filter a list with a condition
Build a new list containing only the values that satisfy a condition using a list comprehension.
list✓ Tested
Filter even numbers
Create a JavaScript array containing only even values.
JavaScript✓ Tested
Find files by extension
Search a directory tree for regular files with a particular extension and print their paths.
find✓ Tested
Format an ISO date
Format a UTC JavaScript Date deterministically.
JavaScript✓ Tested
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
Join strings with a separator
Combine a list of strings into one readable string with a separator between each item.
string✓ Tested
List files in a folder
List the names of regular files in a folder in alphabetical order, excluding subdirectories.
directory✓ Tested
List files in a tar archive
Inspect the contents of a gzip-compressed tar archive without extracting any files.
tar✓ Tested
List running processes
Display process IDs, parent process IDs, and command names for all visible processes.
process✓ Tested