diff --git a/README.md b/README.md index c818b4e..8d537c1 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,7 @@ Content: #!/usr/bin/env sh if [ "$3" = "exec" ]; then - command ls | format -i "$1" -o "mv \"{0}\" \"$2\"" | xargs -0 -P 4 sh -c + command ls | format -0 -i "$1" -o "mv \"{0}\" \"$2\"" | xargs -0 -P 4 -I {} sh -c "{}" else command ls | format -i "$1" -o "mv \"{0}\" \"$2\"" echo diff --git a/main.go b/main.go index 9a6dc01..d76d9c5 100644 --- a/main.go +++ b/main.go @@ -140,7 +140,7 @@ func ReadLine(r *bufio.Reader) (string, error) { } func replaceVars(format string, vars ...string) string { - replacements := replacePattern.FindAllStringSubmatch(format, -1) + replacements := replacePattern.FindAllStringSubmatch(format, -1) // TODO arguments do not change in outer loop (can be moved to main method) for _, replacement := range replacements { rplStr := replacement[0]