Re: quick shell questions

2002-12-12 Thread martin f krafft
also sprach sean finney <[EMAIL PROTECTED]> [2002.12.10.2011 +0100]: > find path -iname '*ogg' -print0 | xargs -0 -n1 -i mv "{}" "`date +%N`.jpg" find path -iname '*ogg' -exec mv "{}" "`date +%N`.jpg" \; no need for xargs (although it is cool). -- Please do not CC me! Get a proper mailer instea

Re: quick shell questions

2002-12-10 Thread Carel Fellinger
On Tue, Dec 10, 2002 at 01:00:51PM -0500, Drew Cohan wrote: > 1. How do I combine these two (JPG vs jpg): > > for f in /path/to/*.JPG; do mv "$f" `date +%N`.jpg; done > for f in /path/to/*.jpg; do mv "$f" `date +%N`.jpg; done that's really simple: for f in /path/to/*.[jJ][pP][gG]; do mv "$f"

Re: quick shell questions

2002-12-10 Thread sean finney
On Tue, Dec 10, 2002 at 01:00:51PM -0500, Drew Cohan wrote: > 1. How do I combine these two (JPG vs jpg): > > for f in /path/to/*.JPG; do mv "$f" `date +%N`.jpg; done > for f in /path/to/*.jpg; do mv "$f" `date +%N`.jpg; done how about for f in `find /path/to -iname '*jpg'`; do mv "$f" `date +

Re: quick shell questions

2002-12-10 Thread Bruce Park
From: "Drew Cohan" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: quick shell questions Date: Tue, 10 Dec 2002 13:00:51 -0500 1. How do I combine these two (JPG vs jpg): for f in /path/to/*.JPG; do mv "$f" `date +%N`.jp

Re: quick shell questions

2002-12-10 Thread Colin Watson
On Tue, Dec 10, 2002 at 01:00:51PM -0500, Drew Cohan wrote: > 1. How do I combine these two (JPG vs jpg): > > for f in /path/to/*.JPG; do mv "$f" `date +%N`.jpg; done > for f in /path/to/*.jpg; do mv "$f" `date +%N`.jpg; done > > I'm trying to avoid duplicate filenames during my renaming session

quick shell questions

2002-12-10 Thread Drew Cohan
1. How do I combine these two (JPG vs jpg): for f in /path/to/*.JPG; do mv "$f" `date +%N`.jpg; done for f in /path/to/*.jpg; do mv "$f" `date +%N`.jpg; done I'm trying to avoid duplicate filenames during my renaming sessions. 2. What does the "2>/dev/null>&1" mean that I see in a lot of exa