help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed acting weird


From: cppaddict
Subject: sed acting weird
Date: Fri, 16 Jul 2004 02:19:19 GMT

Hi,

It would be a great help if anyone could explain this:

echo aaabbbccc | sed 's/[^a]//g'

is producing "bbbccc"

echo aaabbbccc | sed 's/[a]//g'

is also producing "bbbccc"

Shouldn't the first example produce "aaa"?

Am I using [^ ] incorrectly?

Thanks for any help,
cpp


reply via email to

[Prev in Thread] Current Thread [Next in Thread]