source: bin/rmdotdot@ 09bc09

Last change on this file since 09bc09 was 5d30c1, checked in by Frederik Heber <heber@…>, 13 years ago

Initial commit based on 3.0.0alpha (here claimed as 2.4).

  • simply added all files.
  • Property mode set to 100755
File size: 262 bytes
Line 
1#
2eval 'exec perl $0 $*'
3 if 0;
4
5$path = shift;
6$newpath = rmdd($path);
7
8while ($path ne $newpath) {
9 $path = $newpath;
10 $newpath = rmdd($path);
11}
12
13print $newpath;
14
15sub rmdd {
16 my $path = shift;
17 $path =~ s/\/[^\/.]*\/\.\.//;
18 return $path;
19}
20
Note: See TracBrowser for help on using the repository browser.