LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-13-2009, 09:14 AM   #1
kpraveen455
Member
 
Registered: Feb 2009
Location: Hyderabad
Distribution: fedora
Posts: 33

Rep: Reputation: 17
Question difference between wc -c and -m


Hi All,

I was reading man page of "wc" and not able to figure out what is the difference between options (-c and -m)

-c, --bytes
print the byte counts

and
-m, --chars
print the character counts

Please, anybody could clarify me.... (I am just confused)
 
Old 07-13-2009, 10:19 AM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by kpraveen455 View Post
I was reading man page of "wc" and not able to figure out what is the difference between options (-c and -m)
It comes down to how line endings are counted:
Article from Linux Journal about wc
 
Old 07-14-2009, 01:38 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I can't test this theory, but I'd have thought the different switches would come in useful when looking at multi-byte charsets eg Japanese/Korean/Chinese.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
What the difference? mandytrajano Linux - General 12 02-02-2009 07:49 PM
What is the Difference? SpaceCrusader Linux - General 5 07-15-2006 10:43 PM
What is the difference or what is the best for... Worksman Linux - Software 19 09-09-2005 07:22 AM
What is the difference? swmok Debian 1 04-22-2004 09:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration