-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($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 <pattern> use a pattern to edit; ignored if -f is given
|
||||
-f <file> 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!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue