Be confused with cut

Code:
Freebsd1# echo "aaa.bbb" | cut -d'.' -f1,2
aaa.bbb

I think the result should be aaabbb.
Why there is still a '.'?
I am confused.
Could anyone help :)
 
cut(1):
Code:
     -f list
             The list specifies fields, separated in the input by the field
             delimiter character (see the -d option).  Output fields are [b]sepa‐
             rated by a single occurrence of the field delimiter character[/b].

:)
 
It would appear in practice that cut(1) leaves the delimiter in the output. The example from the manpage ([cmd=c:\>] cut -d : -f 1,7 /etc/passwd[/cmd] leaves the ":"). As to what you should use, I don't know. sed(1)?
 
Back
Top