From: Camelia NASTASE Subject: Re: Find command in shell script Date: Tue, 18 Jun 2002 09:57:57 +0300 (EEST) Sender: linux-admin-owner@vger.kernel.org Message-ID: <20020618095354.G35283-100000@bofh.dnt.ro> References: <000101c2166f$40d70710$697ba8c0@wrkeppo02> Mime-Version: 1.0 Return-path: In-Reply-To: <000101c2166f$40d70710$697ba8c0@wrkeppo02> List-Id: Content-Type: TEXT/PLAIN; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Rowan Eppelstun Cc: linux-admin@vger.kernel.org try with FILENAME="200206*.pdf". > ------------- > #!/bin/sh > > MONTH='date +%m' > DATE='date +%Y%m' > DIR=/home/rowan/eod/2002/ba > > if DATE=200206; then FILENAME="'200206*.pdf'" > fi > > if MONTH=06 ; then MONDIR=$DIR/jun/ > fi > > cd $DIR > > pwd > > find ./ -name $FILENAME -exec mv -f '{}' $MONDIR ';' > > exit 0 > ---------------------------------------------------------------------------- > ------------------ > > Thanks in advance. > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > - > To unsubscribe from this list: send the line "unsubscribe linux-admin" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Camelia Nastase, camelia@office.dnt.ro Network Administrator Dynamic Network Technologies, Romania Tel: +40-1-2106863 Fax: +40-1-3122745