why n option is not working here   [root@testgfs2 final]# echo a b c | sed -ne 's/[[:blank:]]//gp' -ne 's/^//pg' -ne 's/$//pg'    abc    abc    abci just need :abcactually i want sed to do somehting like :echo a b c d | sed ...output: 'a' 'b' 'c' 'd'
how do i suppress seds unnessary output while using option -e?
shell script;sed
The problem is you are using p as a modifier which prints the pattern space, i.e. result. To fix your example just do:echo a b c | sed -e 's/[[:blank:]]//g' -e 's/^//g' -e 's/$//gYou may also consider using something like:echo a b c | sed -e 's/\(\w*\)/\1/g'instead.