Re: "yum --partial" feature as a bash line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2005-12-11 at 12:24 +0100, cybernet@xxxxxxxxxx wrote:

> # get a list of items
> # remove 4 lines from top  (tac/head/tac)
> # try to update one item at a time
> for k in `yum list updates | awk '{ print $1 }' | tac | head -n-4 | 
> tac`; do yum -y update
> $k; done

UUOTac?  Try "sed '1,4d'" instead of the tac|head|tac stuff.  Or better,
use an awk range to filter the output:

awk '/^Setting up/,/^Updated Packages/{next};{print $1}'

Although this might be better, because it could be used with '-e 0 -d 0'
consistently:

awk 'FNR==1,/^Updated Packages/ {next}; {print}'

Wil
-- 
Wil Cooley <wcooley@xxxxxxxxxxx>
Naked Ape Consulting, Ltd

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux