xargs
Using sed
and xargs
to pass a list of arguments to a command from a text file.
For example, to install two lists of packages in Ubuntu:
xargs
takes the output fromsed
as arguments toapt
sed 's/#.*$//'
filters out text after#
. So thelist2.txt
can have comments like this