Existem algumas abordagens que usam tr
, awk
ou sed
TR:
iconv -l | grep ISO |head -5 |tr '/' '-'
AWK:
iconv -l | awk '/ISO/{gsub("//","--"); print $0}' |head -5
SED:
iconv -l | grep ISO |head -5 | sed 's/\//-/g'
# or, to avoid needing to escape the backslashes:
iconv -l | grep ISO |head -5 | sed 's#/#-#g'