I'm on Ubuntu. I copied some arguments (separated by newline) and I can use xsel to print them out like this
$ xsel arg1 arg2 arg3 arg4 ... Now, I want to use each of these arguments for another command and execute that command as many times as there are arguments.
So I tried
$ xsel | mycommand "constantArgument" $1 However, this executed mycommand only for the first argument. How can I execute it for every argument?