Stupid SysAdmin Tricks: Uniq

SHAC: i just remembered one of the silliest sysadmin hacks ever

SHAC: if you have a file that sometimes has duplicate lines

SHAC: and sometimes doesnt

SHAC: and you want to process each line once

SHAC: if file is called foo

cat foo foo | sort | uniq -d > bar

SHAC: so you cat foo twice into sort so EVERY line has at least 2 instances… then you sort them all out… then you use uniq and say “tell me what lines are duplicated”

SHAC: of course every line is duplicated, but uniq only tells you that once

BRAIN: that is brilliant

SHAC: “boss” taught me it like 4 years ago

Make your own harai gushi

Harai gushi / harai kushi (祓いぐし) are those “lightning wands” you see Shinto priests waving around, made of bundles of folded paper strips attached to a wooden handle.

The strips themselves, called shime, are also used to hang individually

A single one on a tree is a tamagushi (玉串 = たまぐし)

See also:

How-to links:

From David Lister’s
Zigag Papers in Shinto shrines“:

O-shide are the simplest form and usually have a single zigzag. They may, howevr be double, anging in pairs. Go-hei (御幣) are also like twin O-shide, which re joined at the top. Harai gushi on the other hand are a whole bundle of zigzags tied to the top of a short rod. They look superficially like a cheerleader’s pompoms or “wavers”