Skip to content

Instantly share code, notes, and snippets.

View erikbgithub's full-sized avatar

Erik Bernoth erikbgithub

View GitHub Profile
@erikbgithub
erikbgithub / tree.md
Created April 23, 2012 22:37 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

#! /bin/tcsh -f
set i=1
while { i <= $#argv }
@ i = $i + 1
if ( -d $argv[$i] ) then
rm -R $argv[$i]
else
echo Das $i. Argument ist kein Verzeichnis.
endif