Avoid using GNU-only Perl Regepx Grep

This commit is contained in:
Jacopo
2023-04-06 10:12:35 +02:00
parent e2f6db5cae
commit e980f1164e
6 changed files with 19 additions and 18 deletions

View File

@@ -97,7 +97,8 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
def list_versions(*docker_args, status: nil)
pipe \
docker(:ps, *filter_args(status: status), *docker_args, "--format", '"{{.Names}}"'),
%(grep -oP "(?<=\-)[^-]+$") # Extract SHA from "service-role-dest-SHA"
%(grep -oE "\\-[^-]+$"), # Extract SHA from "service-role-dest-SHA"
%(cut -c 2-)
end
def list_containers