From 78d4a3f5d6c356664367429e33198aaab162ba54 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Mon, 21 Jan 2002 08:48:15 +0000 Subject: [PATCH] -t veranderd in -n op verzoek vanstijn hugo --- mvwrap/mvwrap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mvwrap/mvwrap b/mvwrap/mvwrap index 91cf585..53ae6cb 100755 --- a/mvwrap/mvwrap +++ b/mvwrap/mvwrap @@ -103,10 +103,10 @@ sub move_files { chomp($source); chomp($target); unless ( $source eq $target ) { - if ($opt_v||$opt_t) { + if ($opt_v||$opt_n) { print "mv $source $target\n"; } - unless ($opt_t) { + unless ($opt_n) { move("$source", "$target") or die "move failed: $!"; } @@ -205,10 +205,10 @@ sub safety_belt { $filename = $source->[$filenr]; chomp $filename; $rand = &rand_file; - if ($opt_v||$opt_t) { + if ($opt_v||$opt_n) { print "mv $filename $rand\n"; } - unless ($opt_t) { + unless ($opt_n) { move("$filename", "$rand") or die "move failed: $!"; } @@ -249,7 +249,7 @@ sub unlock { sub cmdline { %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"); &help if $opt_h; @@ -279,7 +279,7 @@ At the moment it takes the following options: -p use a pattern to edit; ignored if -f is given -f use a pattern file to edit -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 to prevent overwriting non-specified files!