Table of contents


NAME

pick - select a set of files by time stamp for processing

SYNOPSIS

pick [-b] [-p prefix] [-s suffix] [-t date-time] [-t filename] [-x] file1 file2 ...

DESCRIPTION

Select a set of files for processing based on a time stamp and produce on stdout a set of commands to execute, or if -x is given, execute them dynamically by calls to system(). The return code is 0, or if -x is specified, the last non-zero return code from system().

OPTIONS

Switches and files are processed in order; interspersed switches affect only the following files. Letter case of options and time specifications is ignored in comparisons. Filenames will be case sensitive if that is the convention on the host operating system.
-b
Batch mode; filenames can be appended to the command line up to the host limit. If a longer line is needed, the current one is dealt with, and a fresh one is started. Otherwise one file is processed per command. The command line limits imposed by the host operating systems are: \" The following lines have a single embedded <tab>
PC DOS	  128
TOPS-20	  480
Unix	10240
VAX VMS	  256
-p
String to prefix to filelist to make command; a trailing blank will be automatically supplied.
-s
String to suffix to filelist to make command; a leading blank will be automatically supplied.
-t
select files written since the given date and time, or if timespec is a filename, the date and time of its last write. The timespec is first tested to see if it is an existing file. Acceptable time formats are: \" NB: The following table has a single <tab> on each line

hh:[mm:[ss]]	absolute time today
-hh:[mm:[ss]]	relative time before now
-days	days before today at 00:00:01
today	today at 00:00:01
yesterday	yesterday at 00:00:01
week	1 week ago at 00:00:01
fortnight	2 weeks ago at 00:00:01
Sunday .. Saturday	day on or before today at 00:00:01
\" End of table Time comparisons select files whose write date/time is greater than or equal to the given date/time; thus, if -t somefile is used, and somefile is in the filelist, it will be selected too.
-v
verbose; if -x is specified, echo the command lines to stdout, otherwise be silent.
-x
execute immediately instead of displaying on stdout.

EXAMPLES

Select source files written today for backup to floppy disk (PC DOS): \" The following lines (between .nf and .fi) must begin with an initial <tab>
	pick -x -t today -p copy -s a: *.c *.h
Select files written since Tuesday 00:00:01 (today, if today is Tuesday) for printing (Unix):
	pick -b -x -t tuesday -p lpr *.[ch]
Select files written since file LASTCOMP for compilation (PC DOS) (yes, Make would do this better):
	pick -x -b -t LASTCOMP -p "tcc -c" *.c
	touch LASTCOMP
Archive files written since last archive (PC DOS):
	pick -x -b -t save.arc -p "pkarc a save.arc" *.*

AUTHOR

Nelson H.F. Beebe
Center for Scientific Computing
220 South Physics Building
University of Utah
Salt Lake City, UT 84112
USA

Tel: (801) 581-5254
EMAIL: Beebe@Science.Utah.Edu (Internet)