[bash] How to apply shell command to each line of a command output?