Answer the question
In order to leave comments, you need to log in
Why doesn't Cygwin read the script correctly?
Yesterday, with grief, I wrote my first script
#!/bin/bash
mkdir jpg_m;
mkdir watermark;
for file in *.jpg
do
convert $file -resize 300x300 jpg_m/"`basename $file .jpg`_m.jpg"
done;
for file in jpg_m/*.jpg
do
width=$(identify -format %w $file)
composite -dissolve 65% -gravity center -quality 100 \( d:/Work/watermarks/logo.png -resize $(( $width / 100 * 90 )) \) $file watermark/"`basename $file .jpg`.jpg"
done;
for file in *.jpg
do
width=$(identify -format %w $file)
composite -dissolve 70% -gravity center -quality 100 \( d:/Work/watermarks/logo.png -resize $(( $width / 100 * 90 )) \) $file watermark/"`basename $file .jpg`.jpg"
done;
for file in '*[^m)]'.jpg
do
convert $file -resize 170x250 "`basename $file .jpg`_s.jpg"
done;
for file in *_s.jpg
do
width=$(identify -format %w $file)
composite -dissolve 70% -gravity center -quality 100 \( d:/Work/watermarks/logo.png -resize $width \) $file watermark/"`basename $file .jpg`.jpg"
done;
for file in watermark/*.jpg
do
curl -T $file ftp://test
done;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
d:/Work/scripts/sh/script.sh: line 2: $'\r': команда не найдена
d:/Work/scripts/sh/script.sh: line 3: $'\r': команда не найдена
d:/Work/scripts/sh/script.sh: line 5: $'\r': команда не найдена
': Invalid argument @ error/blob.c/OpenBlob/2702.
_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/674.16\modules\coders\IM_MOD_RL_JPG
' @ error/constitute.c/ReadImage/501.his image format `JPG
' @ error/convert.c/ConvertImageCommand/3252.
d:/Work/scripts/sh/script.sh: line 7: $'\r': команда не найдена
d:/Work/scripts/sh/script.sh: line 9: $'\r': команда не найдена
': Invalid argument @ error/blob.c/OpenBlob/2702.
_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/674.Q16\modules\coders\IM_MOD_RL_JPG
' @ error/constitute.c/ReadImage/501.this image format `JPG
/ 100 * 90 ")ошибка синтаксиса: ожидается операнд (error token is "
d:/Work/scripts/sh/script.sh: line 13: syntax error near unexpected token `$'do\r''
':/Work/scripts/sh/script.sh: line 13: `do
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question