File: indenter.pl

package info (click to toggle)
atom4 4.1-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 908 kB
  • sloc: cpp: 4,451; makefile: 25; perl: 6
file content (11 lines) | stat: -rwxr-xr-x 191 bytes parent folder | download | duplicates (7)
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++;
}