Как насчет сопоставления "
или /
и захвата их?
sed -i "s/_[0-9]\+\([\"\/]\)/_$apps.$title\1/g"
или, что более читабельно, как
sed -i "s=_[0-9]\+\([\"/]\)=_$apps.$title\1=g"
feh --info "echo $mytext"
будет делать то, что вы хотите — echo
просто печатает переданные ему аргументы.
Для чтения из файла используйте вместо этого "cat $myfile"
.
Вы можете использовать
--info "command"
, который показывает вывод команды в левом нижнем углу изображения. Изman feh
--info [flag]commandline
Execute commandline and display its output in the bottom left corner of
the image. Can be used to display e.g. image dimensions or EXIF informa‐
tion. Supports FORMAT SPECIFIERS. If flag is set to ";", the output will
not be displayed by default, but has to be enabled by the toggle_info key.
Вы также можете использовать
--caption-path captions/
если у вас есть текстовые файлы с соответствующими именами для файлов изображений, и текст в этих файлах будет отображаться сбоку по центру внизу изображения.
-K, --caption-path path
Path to directory containing image captions. This turns on caption view‐
ing, and if captions are found in path, which is relative to the directory
of each image, they are overlayed on the displayed image. E.g. with cap‐
tion path "captions/", and viewing image "images/foo.jpg", the caption
will be looked for in "images/captions/foo.jpg.txt".
Также можно управлять размером текста, например, с помощью
--font "yudit/24"
-e, --font font
Set global font. Should be a truetype font, resident in the current
directory or the font directory, and should be defined in the form font‐
name/points, like "myfont/12".
Я не знаю, как переместить вывод из мест по умолчанию, за исключением вывода пробелов и пустых строк, чтобы сдвинуть фактический текст вправо или вверх.
Демонстрационные команды,
$ find
./captions
./captions/sudodus-background.png.txt
./sudodus-background.png
S feh --caption-path captions/ --font "yudit/24" \
--info "echo ' This is output from an echo command\n\n'" \
sudodus-background.png
Демонстрационное изображение,