Skip to content

Instantly share code, notes, and snippets.

@SleeplessByte SleeplessByte/forward.sh
Last active Apr 12, 2020

Embed
What would you like to do?
Shell: forward arguments
#!/usr/bin/env bash
# Documentation on @
# https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#index-_0040
# Documentation on shift [n]
# https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#index-shift
# Why quoting the argument is "necessary":
# https://stackoverflow.com/questions/4824590/propagate-all-arguments-in-a-bash-shell-script/4824637#4824637
# eats 1 argument
shift 1
# forwards the rest to "forward_process"
forward_process "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.