[+]bash/sh/perl - łaczenie plików
winnetou - 07-04-2008 05:01
Dziękuję...
vikus - 07-04-2008 14:07
#!/bin/bash
OLD_DIR=$1 NEW_DIR=$2
OLD_LIST=`ls -l $OLD_DIR | awk '{print $8}'` NEW_LIST=`ls -l $NEW_DIR | awk '{print $8}'`
for OLD_FILE in $OLD_LIST do for NEW_FILE in $NEW_LIST do if [ $OLD_FILE = $NEW_FILE ]; then echo $NEW_FILE cat ${OLD_DIR}/${OLD_FILE} >> ${NEW_DIR}/${NEW_FILE} rm ${OLD_DIR}/${OLD_FILE} fi done done
mv $OLD_DIR/* $NEW_DIR
zanotowane.pldoc.pisz.plpdf.pisz.plminister.pev.pl
|