Natanox@discuss.tchncs.de to linuxmemes@lemmy.worldEnglish · 3 months agoEasy, it's uuuuuuuuh…discuss.tchncs.deimagemessage-square40fedilinkarrow-up1443arrow-down14
arrow-up1439arrow-down1imageEasy, it's uuuuuuuuh…discuss.tchncs.deNatanox@discuss.tchncs.de to linuxmemes@lemmy.worldEnglish · 3 months agomessage-square40fedilink
minus-squaremogoh@lemmy.mllinkfedilinkarrow-up42arrow-down1·3 months ago Which one of these commands is correct? A: sed -E 's/\b(\w+)\b/echo \1 | rev/g' file.txt B: sed 's/\b\w+\b/echo & | rev/ge' file.txt C: sed -E 's/(\w+)/$(echo \1 | rev)/g' file.txt D: sed 's/\([a-zA-Z]\+\)/\n&\n/g; s/\n\(.*\)\n/\3\2\1/g; s/\n//g' file.txt Chatty was so kind to transcribe. May contain errors.
minus-squaremogoh@lemmy.mllinkfedilinkarrow-up29arrow-down1·3 months agoChatty claims the correct answer to be: Spoiler B I tried it my self and I conclude: Spoiler none is correct.
minus-squareUltraBlack@lemmy.worldlinkfedilinkarrow-up11arrow-down1·3 months agoThought so lol A: didn’t even try what by does B: Single quotes prevent execution C: there is no way to execute commands afaik so this won’t work either D: that syntax is just wrong afaik
minus-squaretetris11@lemmy.mllinkfedilinkarrow-up6·edit-23 months agosed can execute commands with the /e option
Chatty was so kind to transcribe. May contain errors.
Chatty claims the correct answer to be:
Spoiler
B
I tried it my self and I conclude:
Spoiler
none is correct.
Thought so lol
A: didn’t even try what by does B: Single quotes prevent execution C: there is no way to execute commands afaik so this won’t work either D: that syntax is just wrong afaik
sed can execute commands with the /e option