سؤال

I want to change all occurrences of <ga/ to <. With xargs, this works fine:

ls | xargs sed -i 's/<ga\//</g'

GNU Parallel says that it's a direct replacement for xargs, but doing

ls | parallel sed -i 's/<ga\//</g'

results in

/bin/bash: ga//: No such file or directory

for each file in the directory. I'm sure that I'm just forgetting a {} or \; somewhere, but the answer still alludes me.

هل كانت مفيدة؟

المحلول

ls | parallel -q sed -i 's/<ga\//</g'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top