FIND YOUR NEXT FEW LINES

Results for “script”

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

407 snippets foundClear filters
Bash ScriptsInput streams & redirection

Read from a dedicated file descriptor

Bash Scripts: An explicitly opened descriptor keeps the script’s ordinary standard input available.

Bash Scripts✓ Tested
GoErrors & validation

Return a descriptive validation error

Return a descriptive validation error using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactCustom hooks

Reuse event subscription cleanup

Reuse event subscription cleanup with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsProcesses & environment

Stop a child process created by the script

Bash Scripts: Send a signal only to the captured PID of the script’s own child and wait for it to exit.

Bash Scripts✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Bash ScriptsGetting Started

Write and run a first Bash script

Bash Scripts: Write and run a first Bash script with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsInput streams & redirection

Write several messages through one file descriptor

Bash Scripts: Open a destination once and close the descriptor after writing.

Bash Scripts✓ Tested
HTMLText semantics

Write subscripts and superscripts in ordinary text

HTML: Sub and sup position short annotations such as formula indices and exponents.

HTML✓ Tested
JavaScriptUTC date operations

Add calendar days in UTC

JavaScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.

JavaScript✓ Tested
TypeScriptUTC date operations

Add calendar days in UTC

TypeScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.

TypeScript✓ Tested
Bash ScriptsArray operations

Append several items to an array

Bash Scripts: Array-plus-equals adds elements without losing spaces inside a quoted item.

Bash Scripts✓ Tested
Bash ScriptsParameter expansion

Assign a default to an empty or unset variable

Bash Scripts: The colon-equals expansion both supplies and assigns a fallback value.

Bash Scripts✓ Tested