Messages in this thread | | | Date | Thu, 12 Mar 1998 09:23:33 +0100 (MET) | From | Ragnar Hojland Espinosa <> | Subject | Re: kmod/kerneld |
| |
On Thu, 12 Mar 1998, Bernhard Rosenkraenzer wrote:
> My solution was > > if test `uname -r` == "2.0.33"; then > /sbin/kerneld > fi
What about this, supposing you can run cut and expr:
#!/bin/bash
expr `echo \`uname -r\`|cut -f1 -d.` \* 65536 + \ `echo \`uname -r\`|cut -f2 -d.` \* 256 + \ `echo \`uname -r\`|cut -f3 -d.` \<\= 131418 1>/dev/null
if [ $? -eq 0 ] then echo load kerneld fi
Of course you, too, could store the value of expr in a variable and use it somewhere else :)
____/| Ragnar Hojland (tech.support@redestb.es) Fingerprint 94C4B \ o.O| 2F0D27DE025BE2302C =(_)= "Thou shalt not follow the NULL pointer for 104B78C56 B72F0822 U chaos and madness await thee at its end." hkp://keys.pgp.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |