I'm getting an issue on piping in linux,
ls | grep feedback
I have an alias for xdg-open which is open, how can do to make the filename from grep goes directly to open
this is not working
ls | grep feedback | open
xargs builds and execute command lines from standard input.
The syntax is simple:
This will not work if the file name contains a space. For example, for a file called
The above would attempt to open a file called
In this case, you can use quotes to delimit the filename:
However, this approach may fail if the filename contains spaces.
Another option would be using find, which avoids pipes altogether:
Through command substitution, a similar result can be achieved:
This will work, even if the file contains spaces.