changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: bootrc: simplify bootargs splitting avoiding awk

changeset 4414: 68c3ed8bb168
parent 4413: 7ec63d7bcad7
child 4415: 9a0701682c55
child 4416: 75f7cec8082a
author: cinap_lenrek@felloff.net
date: Thu, 09 Apr 2015 15:36:20 +0200
files: sys/src/9/boot/bootrc
description: bootrc: simplify bootargs splitting avoiding awk
     1.1--- a/sys/src/9/boot/bootrc
     1.2+++ b/sys/src/9/boot/bootrc
     1.3@@ -70,8 +70,9 @@ fn main{
     1.4 		}
     1.5 		if not bootargs=$nobootprompt
     1.6 		nobootprompt=()
     1.7-		mn=`{echo $bootargs | awk -F! '{print $1}'}
     1.8-		ma=`{echo $bootargs | sed 's/[^!]*!?//'}
     1.9+		mn=`{echo $bootargs | sed 's,!, ,'}
    1.10+		ma=$mn(2-)
    1.11+		mn=$mn(1)
    1.12 		switch(m$"mn){
    1.13 		case $mt
    1.14 			mp=m$mn