acme
This commit is contained in:
commit
c2271ba672
43 changed files with 886 additions and 0 deletions
17
bin/t2s
Executable file
17
bin/t2s
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $N_SPACES = $ARGV[0] || 4;
|
||||
|
||||
while (my $line = <STDIN>) {
|
||||
# Skip empty lines
|
||||
print "\n" and next if $line !~ m/\S/;
|
||||
|
||||
$line =~ m/^(\t*)(.+)$/;
|
||||
my $n_tabs = length($1);
|
||||
my $n_spaces = $n_tabs * $N_SPACES;
|
||||
|
||||
print ' ' x $n_spaces . "$2\n";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue