FIND YOUR NEXT FEW LINES

Results for “script”

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

407 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Read named regex capture groups

TypeScript: Named groups make a fixed input format easier to inspect than numeric group positions.

TypeScript✓ Tested
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
JavaScriptGetting Started

Read one character from ASCII text

JavaScript: Use a valid zero-based index to read the first character.

JavaScript✓ Tested
TypeScriptGetting Started

Read one character from ASCII text

TypeScript: Use a valid zero-based index to read the first character.

TypeScript✓ Tested
Bash ScriptsGetting Started

Read part of a shell string

Bash Scripts: Read part of a shell string with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Read positional parameters in a function

Bash Scripts: Read positional parameters in a function with a small standalone Bash program.

Bash Scripts✓ Tested
JavaScriptGetting Started

Read the beginning of a text value

JavaScript: Extract or display the first three ASCII characters from a known nonempty string.

JavaScript✓ Tested
TypeScriptGetting Started

Read the beginning of a text value

TypeScript: Extract or display the first three ASCII characters from a known nonempty string.

TypeScript✓ Tested
JavaScriptArray traversal & selection

Read the final array item with a negative index

JavaScript: at supports negative positions counted from the end.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Read the final array item with a negative index

TypeScript: at supports negative positions counted from the end.

TypeScript✓ Tested
Bash ScriptsGetting Started

Read the first array element

Bash Scripts: Read the first array element with a small standalone Bash program.

Bash Scripts✓ Tested
JavaScriptGetting Started

Read the first collection element

JavaScript: Access index zero only after establishing that the collection is nonempty.

JavaScript✓ Tested