The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sys::Manage::CmdFile - Systems management commands file processor

SYNOPSIS

 use Sys::Manage::CmdFile;
 Sys::Manage::CmdFile->dofile(script file, command file);
 Sys::Manage::CmdFile->dofile(script file, command file => history file);
 Sys::Manage::CmdFile->dofile('bin/smcmv.pl', 'var-test/soon-do' => 'soon-done');
 Sys::Manage::CmdFile->dofile(sub{}(row),...)

DESCRIPTION

See dofile and dofck methods below.

new () -> new object

Creates a new object.

dofck (dofile args)
dofck (sub{}(commands file, ? history file, ? redirect log file),...)

Checks dofile commands file for command rows present. If commands found, executes script or sub{} given once, for file names.

'$_' for sub{} contains file names and redirection.

dofile (? script file || false, commands file, ? history file || false, ? redirect log file || false)
dofile (sub{}(command row, redirect log file),...)

Processes text file interpreting rows as script command lines and moving rows proceeded to history file if given.

Command file name may be relative to script directory. History and redirect file names may be relative to the command file directory.

'$_' for sub{} contains command row and redirection been evaluating.

$ENV{SMCFP}

Name of the command file be processing, may be used in Sys::Manage::Cmd script to verify permission.

$ENV{SMSECS}

Number of seconds to spend for processing. Decremented by dofck and dofile for subsequent operation.

LICENSE

This is free software; you can use redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Andrew V Makarow <makarow at mail.com>, for yuri