I'm trying to do the following with xargs
pacman -Q | grep xf86-video | awk '{print $1}' | xargs pacman -R
to remove all xf86-video-* driver on my machine. To make the question more clear, here is the output of pacman -Q | grep xf86-video | awk '{print $1}'
:
xf86-video-ark
xf86-video-ati
xf86-video-dummy
xf86-video-fbdev
xf86-video-glint
xf86-video-i128
xf86-video-intel
xf86-video-mach64
xf86-video-neomagic
xf86-video-nouveau
....
when I redirect the result to xargs
, the output looks like this:
The point is, the command which xargs
is about to execute need user to do some additional input(as you can see it needs a Yes/No), but xargs
automatically add a unknown symbol #, and exit, which causes my purpose UNACHIEVED.
WHY xargs
would do this or, what can I do to use xargs
for command with prompt?