sort_dataset.sh 178 Bytes
Newer Older
1 2 3 4
#!/bin/bash

#      | sort by number of nodes (equivalent to number of "{")
cat $1 | awk '{print gsub("{","{"), $0}' | sort -n  | cut -d' ' -f2- > "${1%.bracket}_sorted.bracket"