それから:
A=<item ok:my=world"hello/my.earth/my.land/mycity"><item or mylove:heart="myGIRL" oh:myGOD="i-love-you"><item></item></item></item>
B=<item ok:my=world"hello/my.earth/my.land/mycity"><item or mylove:heart="myGIRL" oh:myGOD="i-love-you"><item>LOVER.png;LOVER-ever.png</item></item></item>
おそらく、コマンドはsed、awkです。
書き込みエラーを修正しています。
#!/bin/bash
replace_a=<item ok:my=world"hello/my.earth/my.land/mycity"><item or mylove:heart="myGIRL" oh:myGOD="i-love-you"><item></item></item></item>
replace_b=<item ok:my=world"hello/my.earth/my.land/mycity"><item or mylove:heart="myGIRL" oh:myGOD="i-love-you"><item>LOVER.png;LOVER-ever.png</item></item></item>
....
....
ベストアンサー1
[[:punct:]]
文字クラスの使用sed
:
% LC_ALL=C sed 's/[[:punct:]]//g' <<<"$A"
item okmyworldhellomyearthmylandmycityitem or myloveheartmyGIRL
% LC_ALL=C sed 's/[[:punct:]]//g' <<<"$B"
item okmyworldhellomyearthmylandmycityitem or myloveheartmyGIRL ohmyGODiloveyouitemLOVERpngLOVEReverpngitemitemitem
[[:punct:]]
ロケールの次の文字と一致しますC
。
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~