Mailinglist Archive: opensuse-programming-de (27 mails)

< Previous Next >
Re: [opensuse-programming-de] Bilddatei als Ressource im Script ablegen
  • From: Jan Trippler <Jan.Trippler@xxxxxxxxxxx>
  • Date: Mon, 4 Oct 2010 20:03:40 +0200
  • Message-id: <201010042003.40968.Jan.Trippler@xxxxxxxxxxx>
Moin,

Am Mittwoch, 29. September 2010, 20:10:07 schrieb David Haller:
[...]
find -type f -iname '*.jpg' | while read -r FILE; do

#Files mit Rahmen __R.JPG nicht nochmal bearbeiten
if ! test `echo "$FILE" | grep "__R.JPG"`; then

Useless use of echo. Den Exitcode bekommst du auch direkt von grep.
Und das grep sollte man "verankern": grep '__R.JPG$'.

if ! echo "$FILE" | grep -q "__R.JPG$"; then
[...]

Useless use of if-then-fi + grep ;-)

find -type f -iname '*.jpg' \! -name '*_R.JPG' | while read -r FILE; do

cu
Jan

--
Homepage: http://www.jan-trippler.de
--
To unsubscribe, e-mail: opensuse-programming-de+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-programming-de+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups