File: indent-smb.conf.pl

package info (click to toggle)
samba 2%3A4.17.12%2Bdfsg-0%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-updates
  • size: 160,436 kB
  • sloc: ansic: 1,891,228; python: 221,694; sh: 66,081; xml: 52,188; perl: 35,329; makefile: 6,056; yacc: 4,106; exp: 1,582; cpp: 1,224; lex: 858; awk: 581; java: 119; csh: 58; sed: 45; asm: 30
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"; }
}