File: indent-smb.conf.pl

package info (click to toggle)
samba 2%3A4.1.11%2Bdfsg-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 102,616 kB
  • sloc: ansic: 1,163,067; xml: 114,289; python: 103,162; perl: 28,109; sh: 12,165; asm: 3,281; cpp: 2,281; yacc: 1,949; ada: 1,681; exp: 1,582; makefile: 1,181; pascal: 1,089; cs: 879; lex: 566; awk: 140; csh: 58; sed: 45
file content (8 lines) | stat: -rwxr-xr-x 210 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
#!/usr/bin/perl

while(<STDIN>) {
	if(/^$/) { }
	elsif(/^([ \t]*)#(.*)/) { print "#$2\n"; }
	elsif(/^([ \t]*)(.*) = (.*)$/) { print "\t$2 = $3\n"; }
	elsif(/^([ \t]*)\[(.*)\]([ \t]*)$/) { print "\n[$2]\n"; }
}