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

Re: missing LSB tags and overrides



On Thu, Jul 24, 2014 at 03:07:37PM +0100, Steve Kemp wrote:
> On Thu Jul 24, 2014 at 14:40:14 +0100, Brian wrote:
> 
> > > How do I join this output into the purge command to save typing in each
> > > package name?
> > 
> > A=$(dpkg -l | sed  '1,5d' | grep ^rc | awk -F" " '{print $2}')
> 
>   That seems needlessly complex, using both sed and awk.
> 
>   Removing sed you could use this:
> 
>      dpkg --list | grep ^rc | awk '{print $2}'
> 
>   And given that awk can be used to match you could drop the grep too:
> 
>     dpkg --list | awk '/^rc/ {print $2}' 

All this, of course, assumes the OP doesn't want to use the previously
mentioned suggestion of "aptitude purge '~c'". And that's fair enough;
aptitude is not to everyone's taste.

Attachment: signature.asc
Description: Digital signature


Reply to: