Re: [shr-u] update shr quite safely

2009-07-27 Thread Rui Miguel Silva Seabra
Oh, awk is useful, for a lot of things, but it's not such an important thing if you have more important stuff to learn/do :) As a sysadmin, I have some professional motivation to know a bit of awk :) Rui On Mon, Jul 27, 2009 at 11:11:02AM +0200, Davide Scaini wrote: > man page of awk is humongou

Re: [shr-u] update shr quite safely

2009-07-27 Thread Rui Miguel Silva Seabra
On Mon, Jul 27, 2009 at 10:04:40AM +0100, Rui Miguel Silva Seabra wrote: > Most of my knowledge of cat comes from: s/cat/awk/ of course :) -- ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/c

Re: [shr-u] update shr quite safely

2009-07-27 Thread Davide Scaini
man page of awk is humongous! "...it's probably not worth investing a lot of time in awk unless you really have to (grades, salary, etc...)" he he ok, i'll wait. Thanks for your tips, at least i learnt some things ;-) d On Mon, Jul 27, 2009 at 11:04 AM, Rui Miguel Silva Seabra wrote: > Most of m

Re: [shr-u] update shr quite safely

2009-07-27 Thread Rui Miguel Silva Seabra
Most of my knowledge of cat comes from: a) man page b) a class where one of the subjects was programming in awk (and other tools) c) web search for particular cases, problems, or examples :) Perhaps googling for "awk howto" or "awk programming" etc... However, it's probably not worth investin

Re: [shr-u] update shr quite safely

2009-07-27 Thread Davide Scaini
ok, thanks! (i'll try to reduce my useless cats) but awk syntax is really "awkward" ;-) do you know a bright guide for awk? (please not man awk...) d On Sun, Jul 26, 2009 at 10:12 PM, Rui Miguel Silva Seabra wrote: > Because you launched 1 program then 4 programs in background, which > are fed to

Re: [shr-u] update shr quite safely

2009-07-26 Thread Rui Miguel Silva Seabra
Because you launched 1 program then 4 programs in background, which are fed to a while loop => much memory + cpu usage. With... opkg list_upgradable | awk '!/(kernel|Multiple)/ {print $1}' ... you now launch less 3 programs than before (two greps and one cat), while feeding exactly the same outp

Re: [shr-u] update shr quite safely

2009-07-26 Thread Davide Scaini
he he this is the power of opensource... why you said that is heavy? (i just want to learn, i'm quite newbie in scripting and expecially using awk...) d On Sun, Jul 26, 2009 at 8:29 PM, Rui Miguel Silva Seabra wrote: > On Sun, Jul 26, 2009 at 07:18:07PM +0100, Rui Miguel Silva Seabra wrote: > > O

Re: [shr-u] update shr quite safely

2009-07-26 Thread Rui Miguel Silva Seabra
On Sun, Jul 26, 2009 at 07:18:07PM +0100, Rui Miguel Silva Seabra wrote: > On Sun, Jul 26, 2009 at 07:49:19PM +0200, Davide Scaini wrote: > > I want to share my little bash script to update shr without distroying my > > existing kernel (a true 2.6.28). > > It's really stupid, but maybe someone cou

Re: [shr-u] update shr quite safely

2009-07-26 Thread Rui Miguel Silva Seabra
On Sun, Jul 26, 2009 at 07:49:19PM +0200, Davide Scaini wrote: > I want to share my little bash script to update shr without distroying my > existing kernel (a true 2.6.28). > It's really stupid, but maybe someone could find it interesting. > > opkg list_upgradable > upgradable > > cat upgradabl

[shr-u] update shr quite safely

2009-07-26 Thread Davide Scaini
Hi guys, I want to share my little bash script to update shr without distroying my existing kernel (a true 2.6.28). It's really stupid, but maybe someone could find it interesting. opkg list_upgradable > upgradable cat upgradable | awk '{print $1}' | grep -v kernel | grep -v Multiple | while rea