Quote:
Originally Posted by mkan
hi thanks locustfurnace
vgersh99 - sorry for asking this silly doubt
sed -e 's/[^;]//g' file |wc -c - this works fine no doubt,
but if i try
sed -e 's/;//g' file |wc -c - its not working why
i know ^ is used for excluding....what are u trying to do which makes it work
sed -e 's/[^;]//g' file
replace all the characters that are
not ';' with null-strings/nothing. This effectively removes any non-';' character.
What is left?
What is left are ';'-s - and we count [wc -c] them .