2009/4/7 D. Hugh Redelmeier <hugh@xxxxxxxxxx>: > | From: "Sharpe, Sam J" <sam.sharpe+lists.redhat@xxxxxxxxx> > > | 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 fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines