2009/4/7 D. Hugh Redelmeier <[email protected]>:
> | From: "Sharpe, Sam J" <[email protected]>
>
> | runlevel=$(/bin/awk -F ':' '($3 == "initdefault") && ($1 !~ /(#|;)/) { 
> print $2 }' /etc/inittab)
>
> Probably you meant ($1 !~ /^(#|;)/)

Actually I didn't - hence my comment:

> I've assumed that # and ; are comments and aren't allowed in the runlevel 
> descriptions.

# is definitely a comment
; this might be a comment
 # I consider a comment - # is the first non-whitespace character

Because It's only matching on $1 and split on colons, then the only
conceivable bad match would be something like:

id#:5:initdefault:

hence the assumption that # is not allowed in the runlevel descriptions.

-- 
Sam

-- 
fedora-list mailing list
[email protected]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Reply via email to