#!/bin/bash echo 'abbc' \ | perl -pe \ "s,b,{if (1) {\"<\"}; \">\"; if (0) {\"y\"}},ge" # Ausgabe: a00c