Код: Выделить всё
echo "my-repo/text/level1_dir/der.txt my-repo/scripts/af.py my-repo/text/level1_dir/another/er_abc.txt my-repo/text/deep/nested/my-file.txt" | sed -E 's|my-repo/text/.*/([^/]+)\.txt|\1|g'Есть ли способ сделать то же самое?
Подробнее здесь: https://stackoverflow.com/questions/789 ... tring-bash
Мобильная версия