7.5.3 ‘pop()

pop()’ can be used to remove a word from a "string list" without a ‘sed’ call. Word splitting is intentional when using this function.

# Usage
pop foo from $LIST

pop foo from foo baz bar # Returns baz bar