Using xargsdid what I did not expect, although I think it makes sense. This is not what I did, but it is an example that should show what happened.
fn.sh
#!/usr/bin/bash
index=1
for arg in "$@"; do echo "Arg #$index = '$arg'"; let ++index; done
read -p "type something followed by enter: " a
echo "You typed '$a'."
Now here is the command:
echo boo hoo | xargs ./fn.sh
Now I want to fn.shbe able to read from stdinto allow user interaction, but this was usurped xargs. I think I could get xargsto read from a temporary file, but I was wondering if it could use an unnamed file.
source
share