[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unfamiliar construct...

From: Linda A. Walsh
Subject: unfamiliar construct...
Date: Fri, 22 Mar 2013 18:15:13 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20100228 Lightning/0.9 Thunderbird/ Mnenhy/

In reading some suse startup code (*shiver*),

I came across this construct

func() {
local comm       ## command from /proc/$pid/stat

for comm; do
    test -s comm || continue
    ppid = pidofproc $comm
Is that valid code?  does for have some arcane usage
to test if the contents of it exists as a file or something?

Ended up finding that while chasing down a bunch of
lines in the completion.d dir

[ $USERLAND = GNU -o $UNAME = Darwin \
  -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \
  -o $UNAME = OpenBSD ] &&
Which don't work well when some var they expect to be defined,
isn't.  Tried telling them to either use [[]] or use quotes, but so far
have been ignored....so having to fix them manually so I don't gets lots of
bogus errors on login and any user-switch (sudo/su)...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]