|
You are here |
kaveh.page | ||
| | | | |
willhaley.com
|
|
| | | | | This is a trivial example, but is meant to demonstrate how you can pipe arguments to a bash function. #!/usr/bin/env bash lowercase() { # Grab input. declare input=${1:-$(</dev/stdin)}; # Use that input to do anything. echo "$input" | tr '[:upper:]' '[:lower:]' } echo "HELLO there, FRIEND!" | lowercase Which outputs the following. hello there, friend! | |
| | | | |
stevelosh.com
|
|
| | | | | [AI summary] The author shares custom Bash script enhancements for the Mercurial version control command-line prompt, including indicators for the current branch and repository status. | |
| | | | |
dystroy.org
|
|
| | | | | ||
| | | | |
orkohunter.net
|
|
| | | Personal website and blog of Himanshu Mishra (@OrkoHunter) | ||