Results 1 to 3 of 3
I've been read an article describe cksum, like this
'cksum computes a cyclic redundancy check (CRC) checksum for each given file, or standard input'.
and also about one char is ...
- 06-27-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 8
cksum
I've been read an article describe cksum, like this
'cksum computes a cyclic redundancy check (CRC) checksum for each given file, or standard input'.
and also about one char is one byte.
But when execute cksum like this
and the outputCode:echo are | cksum
why output is 4, I think 'are' have 3 byte.Code:2979220839 4
- 06-28-2010 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
The newline character (LF, linefeed, 12b) is added to the string by echo ... cheers, drlCode:% echo are | od -bc 0000000 141 162 145 012 a r e \nWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 06-28-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 8
Oh my God, I forgot you "newline".
Yeah its great newline has been added by echo, and when i use -n option in echo, the output is 3.
Thankyou very much.


Reply With Quote