string - sed - search and replace between 2 marks -
i want search string , modify it
i build string that:
|bor.team1-fcteam2| but also:
|fcteam2-bor.team1| or pattern
|text–text| i want change name of team1, can have different names eg:
bor.team1 b.team1 bteam091 ... i want everytime same name -> b.team1
team everytime in different diction!
i play arround sed 's/\bbor.team1\b/b.team1/g', must find , know every different diction.
that shoudl need:
echo $string | sed -e 's/[a-za-z\.]\+team\([0-9]\+\)/b.team\1/g' it searches alphabetic characters , dot (.) followed word team, followed number ([0-9]). replaced whatever want. in example it's b.team followed found number (\1).
Comments
Post a Comment