repo.or.cz
/
sunny256-utils.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
std.t: create_file(): Use `>` as separate parameter in open()
[sunny256-utils.git]
/
detab
blob
d2abd61440a8e61e60d346d3827b80631aca3b8d
1
#!/usr/bin/env perl
2
3
# detab
4
# File ID: 555c244a-5d38-11df-850a-90e6ba3022ac
5
# Fjerner x antall TAB'er i begynnelsen av her linje.
6
7
$Tabs
=
$ARGV
[
0
]
?
$ARGV
[
0
] :
1
;
8
9
while
(<
STDIN
>) {
10
my
$Linje
=
$_
;
11
for
(
1
..
$Tabs
) {
12
$Linje
=~
s/^\t(.*)/$1/
;
13
}
14
print
"
$Linje
"
;
15
}
16
17
#### End of file detab ####