* Find command in shell script
@ 2002-06-18 2:24 Rowan Eppelstun
2002-06-18 5:19 ` rDNS blocked Kilaru Sambaiah
2002-06-18 6:57 ` Find command in shell script Camelia NASTASE
0 siblings, 2 replies; 3+ messages in thread
From: Rowan Eppelstun @ 2002-06-18 2:24 UTC (permalink / raw)
To: linux-admin
Hi,
I am trying to do the following command in a script but cannot seem to get
the escape characters right for the find - exec mv command.
I am trying to move all files named 200206*.pdf to a subdirectory of their
currnet directory called "jun". Once I get the syntax correct for this I
will automate it for the year, but have got stuck at this bit.
Could anyone please advise what I am missing.
----------------------------------------------------------------------------
-------------
#!/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
^ permalink raw reply [flat|nested] 3+ messages in thread* rDNS blocked 2002-06-18 2:24 Find command in shell script Rowan Eppelstun @ 2002-06-18 5:19 ` Kilaru Sambaiah 2002-06-18 6:57 ` Find command in shell script Camelia NASTASE 1 sibling, 0 replies; 3+ messages in thread From: Kilaru Sambaiah @ 2002-06-18 5:19 UTC (permalink / raw) To: linux-admin Hi, What is meant by rDNS blocked with 127.0.0.2. My mail server is not open relay bust still blocked by osirusoft.org. How to solve this issue. I see very little documentation on their web page and net. thanks, Sam ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Find command in shell script 2002-06-18 2:24 Find command in shell script Rowan Eppelstun 2002-06-18 5:19 ` rDNS blocked Kilaru Sambaiah @ 2002-06-18 6:57 ` Camelia NASTASE 1 sibling, 0 replies; 3+ messages in thread From: Camelia NASTASE @ 2002-06-18 6:57 UTC (permalink / raw) To: Rowan Eppelstun; +Cc: linux-admin 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-18 6:57 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-06-18 2:24 Find command in shell script Rowan Eppelstun 2002-06-18 5:19 ` rDNS blocked Kilaru Sambaiah 2002-06-18 6:57 ` Find command in shell script Camelia NASTASE
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).