3 added 373 characters in body
source | link
printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD

If your $CMD doesn't like the pipe you can try:

printf 'PRESS CTRL+V then ENTER TWICE\n' >&2 ; read -r ENTER

$CMD <<YESALREADY
    $(printf \\n%"$ENTER\n%.0b0b" `seq 1 ${NUMBER OF TIMES YOU WANT}`)
YESALREADY

If that doesn't work you should look into a solution like the expect already mentioned, or a pty. For instance, zsh has a builtin zpty module.

printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD

If your $CMD doesn't like the pipe you can try:

$CMD <<YESALREADY
    $(printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}`)
YESALREADY

If that doesn't work you should look into a solution like the expect already mentioned, or a pty. For instance, zsh has a builtin zpty module.

printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD

If your $CMD doesn't like the pipe you can try:

printf 'PRESS CTRL+V then ENTER TWICE\n' >&2 ; read -r ENTER

$CMD <<YESALREADY
    $(printf "$ENTER\n%.0b" `seq 1 ${NUMBER OF TIMES YOU WANT}`)
YESALREADY

If that doesn't work you should look into a solution like the expect already mentioned, or a pty. For instance, zsh has a builtin zpty module.

2 added 373 characters in body
source | link
printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD

If your $CMD doesn't like the pipe you can try:

$CMD <<YESALREADY
    $(printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}`)
YESALREADY

If that doesn't work you should look into a solution like the expect already mentioned, or a pty. For instance, zsh has a builtin zpty module.

printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD
printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD

If your $CMD doesn't like the pipe you can try:

$CMD <<YESALREADY
    $(printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}`)
YESALREADY

If that doesn't work you should look into a solution like the expect already mentioned, or a pty. For instance, zsh has a builtin zpty module.

1
source | link

printf \\n%.0b `seq 1 ${NUMBER OF TIMES YOU WANT}` | $CMD