Поскольку Вы использовали sh
, нет bash
, затем echo
команда в sh
не имеет опции -e
. От sh
страница справочника:
echo [-n] args...
Print the arguments on the standard output, separated by spaces.
Unless the -n option is present, a newline is output following the
arguments.
И это не имеет \e
, также:
If any of the following sequences of characters is encountered
during output, the sequence is not output. Instead, the specified
action is performed:
\b A backspace character is output.
\c Subsequent output is suppressed. This is normally used at
the end of the last argument to suppress the trailing new‐
line that echo would otherwise output.
\f Output a form feed.
\n Output a newline character.
\r Output a carriage return.
\t Output a (horizontal) tab character.
\v Output a vertical tab.
\0digits
Output the character whose value is given by zero to three
octal digits. If there are zero digits, a nul character
is output.
\\ Output a backslash.
All other backslash sequences elicit undefined behaviour.
Установите пакет Perl Image :: ExifTool
. Он включает программу командной строки под названием exiftool
, которая может изменять EXIF, IPTC, XMP и многие другие формы метаданных изображения :
$ exiftool -IPTC:caption="This is a great image" image.jpg
ExifTool понимает множество других теги .
Есть большая вероятность, что в вашей ОС уже есть пакет ExifTool. Он находится в репозитории пакетов Ubuntu как libimage-exiftool-perl
, в портах FreeBSD как graphics / p5-Image-ExifTool
, а в OS X Homebrew как exiftool
, Например. Официальный сайт распространяет автономные версии Mac OS X и Windows.
Если в вашей системе есть cpanm
, второй самый простой способ установить exiftool
:
$ sudo cpanm Image::ExifTool
Вы также можете установить через cpan
, что является лишь немного сложнее, если вы ответите на все вопросы, которые он задает при первом запуске:
# cpan
cpan> install Image::ExifTool
cpan> exit
Если у вас не установлено ни cpanm
, ни cpan
, даже установка из исходных текстов не сложно:
# cd /tmp
# wget http://search.cpan.org/CPAN/authors/id/E/EX/EXIFTOOL/Image-ExifTool-9.53.tar.gz
# tar xvf Image-ExifTool-9.53.tar.gz
# cd Image-ExifTool-9.53
# perl Makefile.PL
# make install
Запустите программу без аргументов, чтобы получить подробную страницу руководства.