#!/bin/bashs="false,false,false,true"sed -E ':a;s/(,|^)false(,|$)/\1N\2/;ta; :b;s/(,|^)true(,|$)/\1Y\2/;tb' <<< "$s"
Standard input is empty
N,N,N,Y
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!