#!/usr/bin/perl
#NAME
#  hide
#
#SYNOPSIS
#  hide [file]..
#REQUIRES
#
#DESCRIPTION
# Hide files by adding an initial dot.
#
#OPTIONS
# None yet, but there may be some soon.
#
#EXAMPLES
#
#FILES
#
#BUGS
# if .name already exists, "hide name" does nothing.
# Maybe there should at least be a warning message?
#
#SEE ALSO
# The Bp (backup) command has a similar function, but appends '-' or other
# suffixes rather than prepending something.
#
#AUTHOR
#  John Chambers <jc@trillian.mit.edu>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

$| = 1;
$exitstat = 0;
($P = $0) =~ s".*/"";
$V = $ENV{"V_$P"} || $ENV{"D_$P"} || 1;	# Verbose level.
print STDERR "$P: V=$V\n";

foreach $f (@ARGV) {
	if (-f $f) {
		print STDERR "$P: f=\"$f\"\n" if ($F>1);
		$cmd = "mv $f .$f \n";
		print STDERR "$P: cmd=\"$cmd\"\n" if ($F>1);
		system $cmd;
	}
}
