Computer Hope
Software => BSD, Linux, and Unix => Topic started by: billrich on June 11, 2009, 07:36:08 PM
-
$cat saywhat.bat
cat unix.txt
wc -c unix.txt
type unix.txt
mwc.bat
cat unix.txt
wc -c unix.txt
$ saywhat.bat
$cat unix.txt
666666
$wc -c unix.txt
6 unix.txt
$type unix.txt
666666
$mwc.bat
$cat unix.txt
666666
$wc -c unix.txt
6 unix.txt
$
-
Maybe it's counting carriage return, line feed and end of file "characters"? You're showing this at a Windows style C: prompt - what version of wc is this?
-
Maybe it's counting carriage return, line feed and end of file "characters"? You're showing this at a Windows style C: prompt - what version of wc is this?
MKS C Tools for windows from about 1985. I don't know the version.
http://www.mkssoftware.com/reskit/
-
I'm kind of confused that this is in the Linux forum...
Anyway, I suspect my answer as above is correct. Try a few similar files with one line of different lengths - do you always get the 3 ghost characters counted?
-
From an IBM AIX (http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.baseadmn/doc/baseadmndita/cmd_count_words.htm) page, wc -c counts bytes unless the -k flag is added.
I know that's not the same software, but it supports the idea that wc is counting something besides the actual printed characters.
-
i have showed bill why here (http://www.computerhope.com/forum/index.php/topic,85230.0.html)
-
I'm seeing a lot of great minds thinking alike here (plus my rather dull mind).
-
author=Rob Pomeroy link=topic=85331.msg570124#msg570124 date=1244805024]
I'm kind of confused that this is in the Linux forum...
wc is a command for linux and unix and windows
-
Er, yes, I know what wc is... I was just a bit thrown by the C: prompt. Presumably this is running under GnuWin32 or something like that. Of course as the recursive acronym goes, "Gnu's Not Unix". ;)
-
Er, yes, I know what wc is... I was just a bit thrown by the C: prompt. Presumably this is running under GnuWin32 or something like that. Of course as the recursive acronym goes, "Gnu's Not Unix". ;)
Here at Hope "expertise" is gained by the number of posts and not by our knowledge of the subject. It much the same as the U.S. Congress. The top positions are assigned by seniority and not knowledge or accomplishments.
-
Come again?
-
I'd just as well the Star Trek ranks from the first of April were still in place. Our forum ranks may signal levels of expertise, but most of us are known by the advice we give: Patio and Broni for all 'round expertise, evilfantasy for malware expertise, kpac for web page knowledge, and several for batch file expertise. (I leave out many names, and I apologize.)
Me? Well, I try to throw out some pertinent questions every now and then, and I'm really good at recommending you not flash the BIOS of your computer -- unless it's absolutely a last resort -- and I'm not sure I like it, even then! :)
Sure, I like that I rank "Specialist," and that i'll have another in less than one hundred posts, but if someone were to ask if I consider myself a computer specialist, I'd emphatically say, "No."
The long and short of it, is that most of us do not act, or portray ourselves, outside our areas, or above our levels, of expertise.
-
I'm confused at the sudden change of topic...
and several for batch file expertise. (I leave out many names, and I apologize.)
And of course, BC_Programmer for being modest and knowing everything.
HA HA HA
just kidding of course. I'm not that modest.