Take the 2-minute tour ×  I wrote a script which along other
tasks connects to a remote server and pulls a list of all
installed packages and installs them, Like so:  echo -e
"\e[36m#===# Getting list of packages to install #===#\e[0m"
$ssh root@$srv 'rpm -qa --queryformat "%{NAME}\n" >/tmp/sw.lst'
$scp root@$srv:/tmp/sw.lst /tmp/ np=`cat /tmp/sw.lst |wc -l`
echo -e "\e[36m#===# $np Packages are going to be installed!
#===#\e[0m" /usr/bin/xargs yum -y install < /tmp/sw.lst  My
problem is that when it runs through the list it skips many
packages which came with the default installation and i'm trying
to save that time, is that possible?  share|improve this
question add comment  2 Answers  up vote 1 down vote accepted
I'd simply do a  ssh root@$srv 'rpm -qa' | xargs yum -y install
and the go get some coffee or something, because to find a
solution which is    1. quicker   2. works considering each
machines individual packages  you'd still have to do something
like comparing both machines rpm -qa and sort it,