grep file file handle



Hello,

In this script i am copying files to another machine which are newer
than 1 day.
I just want to grep out particular files like *.html and not have
everything copy over.


opendir DIR, '.';
while ($filename = readdir DIR)
{
if ( -M $filename < 1){
system "/bin/rcp $filename server1:/tmp";

}else{
print "no files\n";
}
}

Thanks in advance,

.



Relevant Pages

  • Help - UNIX Shell script problem
    ... I have an UNIX Korn shell script running on HP-UX11 that currently ... encounter a problem in copying files, ... # Remote copy the event files on the DBS server ... # Get the list of remote archive files ...
    (comp.unix.shell)
  • Re: Use Group Policy to deploy a Desktop shortcut
    ... ' An example of using environment variables when copying files. ... ' In this script a shortcut 'shortcut.lnk' is copied to the desktop ...
    (microsoft.public.windows.server.active_directory)
  • Re: Logon script and permissions
    ... I normally just put a shortcut in the Startup folder ... If the workstations can be reached to put in a startup script, ... Copying files and applying permissions is very easy in shell scripting ...
    (microsoft.public.scripting.wsh)
  • Re: txt file as parameter list?
    ... I have a small script for copying files: ... How can I read this dest.txt and pass the computername to xcopy command? ... This could certainlly be done using WSH, but a very simple batch solution exists that looks a bit like this script: ...
    (microsoft.public.scripting.wsh)
  • Re: Double-clicking a Bash script and having it execute in its directory
    ... The first command in the script is to copy all of the contents of the ... I need this script to be double clickable in the Finder. ... copying files from the home folder! ... new Terminal window at the home folder, and the dot portion of "cp ." ...
    (comp.sys.mac.system)