Skip to content

Instantly share code, notes, and snippets.

@robfrawley
Created December 5, 2022 03:58
Show Gist options
  • Save robfrawley/329c22b30a14195a9eb4d154fed43518 to your computer and use it in GitHub Desktop.
Save robfrawley/329c22b30a14195a9eb4d154fed43518 to your computer and use it in GitHub Desktop.
Bash Function Supporting Both Passed Values and Piped Input
#!/usr/bin/env bash
lowercase()
{
# Grab input.
declare input=${1:-$(</dev/stdin)};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment