Solaris Tips

From EggeWiki
Revision as of 16:37, 9 May 2006 by Brianegge (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Comma separate a list

The challenge here is to avoid a trailing comma.

$ echo "foo\nbar\n" | awk ' {printf "%s%s",s,$0;s=","}END{print ""} '
foo,bar

Run a command on all hosts in a netgroup

mrsh -P -c 'uptime' your-netgroup

Find all members in a sudoers group

ypmatch sqladmin group