[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

quick shell questions

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 examples
(eg ls 2>/dev/null/>&1).

I really should take a shell scripting class.  :)


Drew Cohan

Reply to: