depot/third_party/nixpkgs/pkgs/os-specific/bsd/xargs-j.sh
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

17 lines
223 B
Bash

#! @shell@
declare -a args=()
token=$1
shift
while (( $# )); do
if [[ "$1" = "$token" ]]; then
mapfile -t -O $(("${#args[@]}" + 1)) args
else
args+=("$1")
fi
shift
done
exec "${args[@]}"