File: indenter.pl

package info (click to toggle)
atom4 4.1-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 656 kB
  • ctags: 947
  • sloc: cpp: 4,461; makefile: 54; sh: 21; perl: 6
file content (11 lines) | stat: -rwxr-xr-x 191 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w
#
# Indent Atom4 AI logfiles so that it's easier to read!
#

$indent=0;
while (<>) {
  /\>\>/ && !/PRUNE/ && $indent--;
  print "   "x$indent, $_;
  /\<\</ && $indent++;
}