5ive
January 15th, 2010, 01:22 PM
I've created code that will delete the last two lines:
dpkg-l linux-image-*-generic | sed 'N;$!P;$!D;$d'
and that will erase the result of `uname-r`:
dpkg-l linux-image-*-generic | sed'/'$( uname-r) '/ d'
I checked and it works. Just do not know how to combine these two codes into one that you first remove the last two lines, then delete what will the result of `uname-r`. If it turns out that the list of `dpkg-l` there is no kernel showed the result of what `uname-r` then nothing will do.
Can anyone help and sorry for English, but I'm still weak?
dpkg-l linux-image-*-generic | sed 'N;$!P;$!D;$d'
and that will erase the result of `uname-r`:
dpkg-l linux-image-*-generic | sed'/'$( uname-r) '/ d'
I checked and it works. Just do not know how to combine these two codes into one that you first remove the last two lines, then delete what will the result of `uname-r`. If it turns out that the list of `dpkg-l` there is no kernel showed the result of what `uname-r` then nothing will do.
Can anyone help and sorry for English, but I'm still weak?