Explorar o código

Replace 4 letters words beginning by c or finishing by n by coin

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
751c17954a
Modificáronse 2 ficheiros con 6 adicións e 0 borrados
  1. 5 0
      coinSpeech.sh
  2. 1 0
      text.txt

+ 5 - 0
coinSpeech.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+sed -e "s/\<c\w\{3\}\>/coin/g" \
+    -e "s/\<\w\{3\}n\>/coin/g" \
+    $1

+ 1 - 0
text.txt

@@ -0,0 +1 @@
+Hello boys, I need you to ceas this plan. This is a lion, your came is blue.