Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Quick script to show all jail users and how they coordinate with main box userlist
for uid in $(awk 'FS=":" {if ($0!~/^\#/) {print $3}}' /usr/jails/*/etc/passwd /etc/passwd | sort -n | uniq); do
echo -n "$uid "
awk 'FS=":", ORS=" " {if ($0!~/^\#/ && $3=='$uid') {print "[" $1 "]"; if ($7=="/usr/sbin/nologin") {print "(#nologin)"}}}' /etc/passwd
awk 'FS=":", ORS=" " {if ($0!~/^\#/ && $3=='$uid') {print FILENAME ":" $1; if ($7=="/usr/sbin/nologin") {print "#"}}}' /usr/jails/*/etc/passwd | sed -E 's|/usr/jails/||g' | sed -E 's|/etc/passwd||g'
echo ""
done
@jkerian
jkerian / gist:2305769
Created April 4, 2012 21:21 — forked from agrimm/gist:2260875
Comments on some of the resource questions in JL&U
http://japanese.stackexchange.com/questions/2274/great-websites-for-beginner-reading
agrimm: - nice question, but bit of a popularity contest
jkerian: Not answerable. This question should not be allowed as it is purely "What's your favorite website?"
http://japanese.stackexchange.com/questions/9/is-there-an-easily-accessible-list-of-terms-in-the-japanese-grammar-written-both
agrimm: bit too specific
jkerian: I honestly don't see how asking for linguistics terms on on a site at least partly about linguistics can be 'too specific'
http://japanese.stackexchange.com/questions/303/is-the-japanese-language-proficiency-test-jlpt-a-good-measure-of-my-japanese-l
agrimm: too subjective IMO