-t veranderd in -n op verzoek vanstijn hugo
This commit is contained in:
parent
56472b9ea3
commit
78d4a3f5d6
1 changed files with 6 additions and 6 deletions
|
|
@ -103,10 +103,10 @@ sub move_files {
|
||||||
chomp($source);
|
chomp($source);
|
||||||
chomp($target);
|
chomp($target);
|
||||||
unless ( $source eq $target ) {
|
unless ( $source eq $target ) {
|
||||||
if ($opt_v||$opt_t) {
|
if ($opt_v||$opt_n) {
|
||||||
print "mv $source $target\n";
|
print "mv $source $target\n";
|
||||||
}
|
}
|
||||||
unless ($opt_t) {
|
unless ($opt_n) {
|
||||||
move("$source", "$target")
|
move("$source", "$target")
|
||||||
or die "move failed: $!";
|
or die "move failed: $!";
|
||||||
}
|
}
|
||||||
|
|
@ -205,10 +205,10 @@ sub safety_belt {
|
||||||
$filename = $source->[$filenr];
|
$filename = $source->[$filenr];
|
||||||
chomp $filename;
|
chomp $filename;
|
||||||
$rand = &rand_file;
|
$rand = &rand_file;
|
||||||
if ($opt_v||$opt_t) {
|
if ($opt_v||$opt_n) {
|
||||||
print "mv $filename $rand\n";
|
print "mv $filename $rand\n";
|
||||||
}
|
}
|
||||||
unless ($opt_t) {
|
unless ($opt_n) {
|
||||||
move("$filename", "$rand")
|
move("$filename", "$rand")
|
||||||
or die "move failed: $!";
|
or die "move failed: $!";
|
||||||
}
|
}
|
||||||
|
|
@ -249,7 +249,7 @@ sub unlock {
|
||||||
|
|
||||||
sub cmdline {
|
sub cmdline {
|
||||||
%optctl = ();
|
%optctl = ();
|
||||||
&GetOptions("e=s", "h", "p=s", \@pattern, "f=s", "v", "t");
|
&GetOptions("e=s", "h", "p=s", \@pattern, "f=s", "v", "n");
|
||||||
&GetOptions(\%optctl, "e");
|
&GetOptions(\%optctl, "e");
|
||||||
|
|
||||||
&help if $opt_h;
|
&help if $opt_h;
|
||||||
|
|
@ -279,7 +279,7 @@ At the moment it takes the following options:
|
||||||
-p <pattern> use a pattern to edit; ignored if -f is given
|
-p <pattern> use a pattern to edit; ignored if -f is given
|
||||||
-f <file> use a pattern file to edit
|
-f <file> use a pattern file to edit
|
||||||
-v verbose; shows file moves
|
-v verbose; shows file moves
|
||||||
-t test; doesn't move, implies -v
|
-n test; doesn't move, implies -v
|
||||||
|
|
||||||
Specifying files on the command line is still unsafe! There are no checks
|
Specifying files on the command line is still unsafe! There are no checks
|
||||||
to prevent overwriting non-specified files!
|
to prevent overwriting non-specified files!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue