Slashdot Mirror


Learning Unix for Mac OS X Panther

sympleko (Matthew Leingang) writes "In Neal Stephenson's manifesto In the Beginning was the Command Line , he writes about his favorite command-line utility: wc. As simple as can be, wc counts characters, words, and lines in a file. There's no GUI analogue, perhaps because anybody tempted to make one would add too many "features" that cluttered its ease of use. Think: do you know how to count the words in a Word file? BBEdit is a little easier, if you know the button to click." Read on for Leingang's review of Learning Unix for Mac OS X Panther, which seeks to reconcile the conception of user friendliness in OS X's Aqua with the sometimes-denigrated command line. Learning Unix for Mac OS X Panther author Dave Taylor and Brian Jepson pages 168 publisher O'Reilly rating 8/10 reviewer Matthew Leingang ISBN 0596006179 summary Nice and Easy

You can do a tremendous amount of stuff in Mac OS X Panther without ever touching the command line. This includes editing files, transferring them to remote locations, running a web server, and writing programs. Legend has it that some Apple developers wanted to ship OS X without a command-line application because it's anathema to the Mac "experience." But as Unix geeks will tell you, there are tasks which are much better suited to the command line. Routine, repeated, and automated tasks are some, as well as quick-and-easy access to files and directories.

This book is for the skilled Mac user who would like to know a little more about the operating system behind the scenes. There's also information about the Mac's brand of Unix, so someone familiar with Unix but new to the Mac will also find stuff to learn. For those confident in their Mac and Unix skills, however, there's not much new in the book's 168 pages. That's not to say it's a bad book; I found it quite enjoyable to read, and it's a good title to keep in mind to recommend to a Unix novice.

The book begins with an introduction to Terminal.app, the Mac's Unix terminal program. From the very basic (how to find with the Finder) to the fun (how to change the text and background colors) to the useful (how to save terminal sessions into double-clickable .term files), there's much that Terminal has to offer. There's even the cryptic echo '^[]2;My-Window-Title^G' command to change the title of Terminal's window.

The authors then introduce a few simple commands like date and who, and show how to manipulate the terminal's prompt. There's also alias which creates command shortcuts. For instance, if you always run ls with the -F flag, a command alias ls "ls -F" will save you some typing.

Each chapter has two sections which stand out. The "Practice" section gives a list of exercises to try, and the "Problem Checklist" is there to diagnose and fix unexpected behavior.

It's important (especially for those used to other OSes) to understand that in Unix, everything is a file, and all files are organized in the filesystem. This includes plain files, which might be Word documents or system logs; directories, which break up the filesystem into a tree; links, which allow file reuse with different names; devices, drives, etc. All these building blocks of the operating system are discussed. There are also a few pages on vi (which I found quite useful as my vi knowledge up to that point consisted of :q!.) and pico.

Printing on Mac OS X is much like printing on any Unix operating system; you can use pr to format text for line printing, enscript to format for PostScript printing, and lpr to actually queue a printer job. The addition that the Mac provides is a CLI to AppleTalk printers. You can use at_cho_prn to choose an AppleTalk printer and atprint to print to one.

One of Unix's biggest features is its ability to put together small programs to do many different tasks. To count how many files under your home directory are named foo, you can do find ~ -type f -name "foo" | wc -l. By breaking down a problem into components, you only need one-counting program, one file-finding program, etc. The book has a good chapter on this input/output redirection, and how to use those magic top-row characters |, >, >>, and <. Grep (and some light regular expressions) and sort are mentioned as tools for examining text. I thought sed would make a nice addition to this chapter, but perhaps it would lengthen the book too much.

Another advantage of Unix is its true multitasking. What may surprise newcomers to the command-line is that it is possible to run many jobs at once with a single interface. By running commands in the background, one can start large jobs and do other tasks while waiting. In the chapter on multitasking, the & modifier is covered, along with fg, bg, and kill to manipulate processes, and ps and top to report on them.

The command-line interface is lightweight enough that it can easily be extended by a network. This means it's easy (in fact, commonplace) to control a computer different from the one in front of which you're sitting. The authors cover the remote-shell commands ssh and its non-secure cousins, as well as other tools for accessing the internet such as ftp and curl.

The book closes with an introduction to the wealth of open-source software available for Macintosh, now that Macs run a functional Unix. The graphical Unix applications require an X server, which is easy to download and install. The authors show how to install Fink, the Macintosh open-source package manager, and a few big applications like OpenOffice.org and The Gimp.

The last chapter is both a resource list and suggestions for further directions. Those who learn a lot from this book may be interested in picking up shell programming or a scripting language such as Perl.

As I said at the beginning, the book is basic and well-written. Even if you feel it's beneath you, keep the title in mind when a newbie asks what the command-line is all about.

Matthew Leingang is a Preceptor in Mathematics at Harvard University. A funny sentence in the third person escapes him at the moment. You can purchase Learning Unix for Mac OS X Panther from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

337 comments

  1. Word Count in Word by AKAImBatman · · Score: 5, Insightful

    Think: do you know how to count the words in a Word file?

    Tools -> Word Count

    Why is that so hard? It's File -> Properties -> Statistics in OpenOffice.

    1. Re:Word Count in Word by CerebusUS · · Score: 2, Informative

      And if word count is that important to you, you can always add it to the toolbar. Then it's just a matter of hitting "Alt-C"

    2. Re:Word Count in Word by PopCulture · · Score: 1

      yeah pretty funny also:

      To count how many files under your home directory are named foo, you can do find ~ -type f -name "foo" | wc -l

      which is obviously a lot more intuitive than opening up File Explorer and sorting by file name... isn't it ;)

      --

      Here's to finally giving Bush his exit strategy in November
    3. Re:Word Count in Word by dsanfte · · Score: 1, Interesting

      The GUI is another obfuscation and a hinderance to people who know what they want to do, and just want it done.

      I like to view it like this:

      With a command line, you speak directly to the program, if you know the language to use.

      A GUI is going through an intermediary translator who organizes words by categories you don't recognize, obfuscating an already complicated task by playing hide-and-go-seek with nested menus.

      --
      occultae nullus est respectus musicae - originally a Greek proverb
    4. Re:Word Count in Word by kamelkev · · Score: 1

      Hey, you're ruining this posters moment in the spotlight. Don't tear him down yet - wait 20 minutes like the rest of us!

    5. Re:Word Count in Word by SilentChris · · Score: 1

      But what if you want to do the word count of 50 files, and print the results? Using the command line, you can get this done in under 5 seconds.

    6. Re:Word Count in Word by fimbulvetr · · Score: 4, Funny

      It's faster. find ~/ -type f | wc -l is easier finding my mouse, plugging it in, waiting for usb to init, then navigating around.

    7. Re:Word Count in Word by geoffspear · · Score: 5, Funny
      The command line is an obfuscation and a hinderence to people who really know what they want to do.

      If you hook wires up to all the pins on your processor and move them really quickly between connections for the voltages corresponding to 0 and 1, you speak directly to the machine, if you know the language to use. And have really fast hands.

      A command line translates your typing into a language your computer can understand.

      --
      Don't blame me; I'm never given mod points.
    8. Re:Word Count in Word by stratjakt · · Score: 1

      Or using the find feature, if you want a more esoteric count (wildcards and such).

      What if you want to count all the word and excel documents that contain the phrase "unix can jump up my ass"?

      Huh, jack? Where's your command line tool for that?

      --
      I don't need no instructions to know how to rock!!!!
    9. Re:Word Count in Word by MrBlackBand · · Score: 2, Insightful
      With a command line, you speak directly to the program, if you know the language to use.

      But what if you don't know the language to use? That's the main advantage of a GUI over a CLI. If you don't know how to do a word count in a command line environment then you must resort to looking it up in help. If you don't know how to do a word count in a GUI then all you have to do is explore the menus to find the command. Every command is already there right in front of you.

      --
      "It is difficult to get a man to understand something when his salary depends upon his not understanding it."
    10. Re:Word Count in Word by Anonymous Coward · · Score: 1, Funny

      it's called grep

    11. Re:Word Count in Word by Anonymous Coward · · Score: 0

      The script (find ~ -type f -name "foo" | wc -l) finds files in the home directory and subdirectories named "foo" exactly (not foo.this, tarfoo, etc.). Wildcarding can change it to match files with names that start with, end with, or contain a string. Opening File Explorer and sorting by file name (and scrolling or typing starting letter) will find files in the directory (not subdirectories) that start with whatever you've scrolled to, and then you have to count them manually.

    12. Re:Word Count in Word by bsartist · · Score: 1

      Yeah, and walking to the store is faster if you have to build a car before you can drive there. Why do zealots always make such ridiculous comparisons?

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    13. Re:Word Count in Word by AKAImBatman · · Score: 1

      Don't get me wrong. I use 'wc' all the time. I just think the poster's comparison to Word is a bit silly.

    14. Re:Word Count in Word by Jeff+DeMaagd · · Score: 5, Insightful

      It's faster. find ~/ -type f | wc -l is easier finding my mouse, plugging it in, waiting for usb to init, then navigating around.

      Wow. I think you'd make a great benchmark designer. Pick an obscure task that almost nobody needs done, stack the "other" side with an unusual configuration for modern computers and use it as a case in declare that "your" way is a lot better in general.

    15. Re:Word Count in Word by smcdow · · Score: 5, Informative
      What if you want to count all the word and excel documents that contain the phrase "unix can jump up my ass"? Huh, jack? Where's your command line tool for that?
      find ~/. -type f | egrep '\.(doc,xls)$' | xargs grep -l 'unix can jump up my ass' | wc -l

      Easy peasy.

      --
      In the course of every project, it will become necessary to shoot the scientists and begin production.
    16. Re:Word Count in Word by fimbulvetr · · Score: 1

      Yeah, that would suck. Good thing king soopers delivers.
      HAHA, welcome to /., where someone throws the word "zealot" in because it makes himself feel better. Good luck with that.

    17. Re:Word Count in Word by SilentChris · · Score: 0

      Well, I can see what he's getting at.

      The average computer user would probably know where the Word Count command is in Word no more than wc on the command line. They would, however, have an inkling of where to look (Tools on the menu bar should jump out of them). It's often a lot easier to find what you're looking for in a GUI.

    18. Re:Word Count in Word by fimbulvetr · · Score: 1

      You'd think so? I don't know. See *most* of us "Unix guys" really don't even use a gui. Hope your bitter sarcasm really gets the next guy though, because I was a bit disappointed.

    19. Re:Word Count in Word by neonleonb · · Score: 1

      As someone anonymously posted, "grep" is exactly that tool.

      Now, what if you want to know the length of all of your book's chapters that include the phrase "unix can jump up my ass"? Or how many occurrences of that phrase are in each chapter? Command-line tools are great for stuff like that, while Windows's Find tool requires you to open each one by hand and check this stuff out.

    20. Re:Word Count in Word by Anonymous Coward · · Score: 0

      what if the phrase is broken between lines?

    21. Re:Word Count in Word by ViolentGreen · · Score: 2, Insightful

      The command line is an obfuscation and a hinderence to people who really know what they want to do.

      I'd like to modify that to say "The command line is an obfuscation and a hinderence to people who only know what they want to do and not how to do it."

      The command line is extremly powerful. The GUI has it's place though. If you put someone in front of a command line with no insturction, they will have trouble getting around. There are 100+ keys on a keyboard as opposed to 2(3) buttons on a mouse. If you do enought clicking on any desktop environment, you can figure out how to get at least somthing done.

      A GUI can be superior to a command prompt in some situations as well. Say you want to move 15 dissimilarly named files in one directory to another. In a GUI, you open up two "explorer" windows, use your mouse to select exactly which files you want and drag them to the other window. With a CLI, you have to type the 15 distinct file names as well as the destination folder. You could end up with the final command being 3-4 lines long and are more likely to make errors.

      A GUI can make things easy that are tedious in a CLI. A CLI can make things easy that are tedious in a GUI.

      Thankfully you don't have to choose one or the other. There's no reason to.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    22. Re:Word Count in Word by meabolex · · Score: 1

      which is obviously a lot more intuitive than opening up File Explorer and sorting by file name... isn't it ;) Intuition and command line interfaces have always been at odds and for good reason. You enter a command -- you have to know a command before you enter one. Sure, you can do 'man wc' or something to figure out how to use a particular command (in this case wc), but you still have to have knowledge of man pages.

      Command lines are about speed and flexibility. If I need to ssh into my box from a Solaris machine, I'm much better off with knowing the command line interface than some GUI.

      --
      FORTUNE FAVORS IRONY
    23. Re:Word Count in Word by Lars+T. · · Score: 2, Funny

      Only if you don't have to plug in your keyboard first.

      --

      Lars T.

      To the guy who modded me down from perfect to terrible Karma - Apple haters still suck

    24. Re:Word Count in Word by DoctorPepper · · Score: 2, Informative

      Try WinGrep

      --

      No matter where you go... there you are.
    25. Re:Word Count in Word by Anonymous Coward · · Score: 0

      > That's the main advantage of a GUI over a CLI. If you don't know how to do a word count in a command line environment then you must resort to looking it up in help.

      And this is especially true if you don't know how to use the CLI help in the first place - "man" is not the most intuitive command for getting help - assuming you know what command you're trying to look up. 'apropos' isn't intuitive, either.

    26. Re:Word Count in Word by AKAImBatman · · Score: 1

      There are 100+ keys on a keyboard as opposed to 2(3) buttons on a mouse. If you do enought clicking on any desktop environment, you can figure out how to get at least somthing done.

      To be precise, part of GUI design is to be a virtual keyboard extension. All those buttons you see in toolbars are very much like if you had that button on your keyboard. (Some specialized forms of equipment, especially medical, do have such buttons.) The GUI just saves you from buying a new keyboard for every program you want to run. :-)

    27. Re:Word Count in Word by bsartist · · Score: 2, Funny

      Good thing king soopers delivers.

      Yeah, but to call them you'd have to find the phone and plug it in, and then wait for the dial tone to init.

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    28. Re:Word Count in Word by Phrack · · Score: 1
      The command line is an obfuscation and a hinderence to people who really know what they want to do.

      Funny. I think that about many GUI apps.

      --
      Dump the IRS - http://www.fairtax.org
    29. Re:Word Count in Word by smcdow · · Score: 1
      what if the phrase is broken between lines?

      Yikes. That's a little harder:

      find ~/. -type f | egrep '\.(doc,xls)$' | while read f ; do tr -d '\n' < "$f" | grep 'unix can jump up my ass' >/dev/null && echo "$f" ; done | wc -l

      Or something like that.

      At this point, I think the solution is to not use Word nor Excel files.

      --
      In the course of every project, it will become necessary to shoot the scientists and begin production.
    30. Re:Word Count in Word by bsartist · · Score: 4, Insightful

      "Unix guys" really don't even use a gui

      Nonsense! A GUI is a *great* way to organize a few dozen xterms. :-)

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    31. Re:Word Count in Word by Anonymous Coward · · Score: 0

      A GUI is great if you are new to the application and want to get things done quickly.

      If you use an application for a longer period the GUI gets in the way in the long run. That's when a good CLI (or macros or similar) is more effective than clicking and clicking and clicking...

    32. Re:Word Count in Word by Kogase · · Score: 1

      I think most "Unix guys", which pound for pound (person for person) refers to "Linux guys", use a GUI nowadays.

    33. Re:Word Count in Word by Anonymous Coward · · Score: 0

      So where is the "find the text 'Foo' in all my word documents from this directory down, zip them up, and copy them to the server" menu item. That would save me a bit of work each day.

    34. Re:Word Count in Word by fimbulvetr · · Score: 1

      Actually, there's not a keyboard plugged in either, but I didn't want to argue to the rest of the world that unix really runs fine without a keyboard. In most cases, I use serial ports or ssh.

    35. Re:Word Count in Word by geoffspear · · Score: 1
      That assumes that a keyboard is the "natural" way to interact with a computer.

      I don't think any GUI designers are really using "keyboard replacement" as a paradigm for their design. 30 years ago you'd probably have argued that the goal of a keyboard was to mimic what you can do with a stack of punch cards.

      --
      Don't blame me; I'm never given mod points.
    36. Re:Word Count in Word by meabolex · · Score: 2, Informative
      If you don't know how to do a word count in a command line environment then you must resort to looking it up in help.

      Ohh! The agony!

      Google: word count unix: First return:
      This utility displays a count of the number of characters, words and lines in a file.

      1.14 Type the command

      $ wc temp

      This prints out a list of the number of lines, words, and characters respectively.

      The switches for this utility are
      -l print line count
      -c print character count
      -w print word count
      --
      FORTUNE FAVORS IRONY
    37. Re:Word Count in Word by someonehasmyname · · Score: 1

      ROTFL

      --
      Common sense is not so common.
    38. Re:Word Count in Word by killjoe · · Score: 2, Informative

      Use CRM114 Instead of grep.

      It's been described as "like grep if it was bitten by a radioactive spider". In a nutshell it allows you do define sliding windows and search for phrases inside those windows.

      It's way cool.

      --
      evil is as evil does
    39. Re:Word Count in Word by Jupiter9 · · Score: 1

      And for those who are afraid to leave the keyboard.

      ALT-T W

      ALT-T for "Tools"
      and W for "Word Count"

      --

      --
      Does anyone remember /\/\/\?
    40. Re:Word Count in Word by NoOneInParticular · · Score: 1

      This works both ways. I often check out GUI apps for doing some stuff that I would otherwise do with a command line, simply because I can't be bothered to try to find the cl utility and read its man page. Almost invariably I end up with a disillusion where I'm looking like mad through various inaptly named menu structures in the hope I find something that does what I need it to do. The problem with the menu approach is that first you don't know if the function is supported by the app, then you have to look in 'Tools', 'Data', 'View', 'Edit' main menus in the hope that the feature is hidden there. Usually I get frustrated after 10 minutes, wipe the GUI app from my system, find the proper utility, read the manpage and am done in 5, cursing myself that I once again fell for that gui-is-easy myth. CLI's aren't easy and neither are GUI's, they both take time to become competent in.

    41. Re:Word Count in Word by ViolentGreen · · Score: 1

      I agree completly. What I'm saying though, is that you *can* muck around and learn basics without by using a combination of the two buttons. That is much harder to do with a CLI that you know nothing about.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    42. Re:Word Count in Word by Anonymous Coward · · Score: 0

      You mean "Red Hat" guys. Most *nix admins i know do everything CLI either at the terminal or more often via ssh

    43. Re:Word Count in Word by Paladin128 · · Score: 1

      Why is it that people like you take something that was obviously a joke way to seriously?

      --
      Lex orandi, lex credendi.
    44. Re:Word Count in Word by fimbulvetr · · Score: 1

      I'll stick with screen, but thanks.

    45. Re:Word Count in Word by fullmetal55 · · Score: 1

      so clarify yourself, by stating "faster for you". seeing as the vast majority of computer users are not *nix admins, with a staggering array of command line commands memorized complete with switches, arguing your point is perfectly valid but completely specific to a select group of individuals.

    46. Re:Word Count in Word by fimbulvetr · · Score: 1

      If you want to throw linux in there too, which is completely fair, I'll give it to ya. Simply because there are so many (Redhat|Mandrake) users out there that use it for a desktop. But to rephrase, I'd say Unix Admins instead of Unix guys.

    47. Re:Word Count in Word by bsartist · · Score: 1

      It ain't as obvious as you'd think. When hordes of CLI zealots are all bleating the same ridiculous comparisons over and over, it's kind of difficult to realize that the guy on the left who appears to be saying the same thing is actually just making fun of all the others.

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    48. Re:Word Count in Word by fimbulvetr · · Score: 1

      Yep, faster for me. That's all I said. I can prove it day and night. I can even show you after I've had a few beers.

    49. Re:Word Count in Word by burns210 · · Score: 3, Interesting
      AUX, apple's system 7-era Unix system, had a cool app that never got much attention. It was a bit of a GUI app called Comando. Double-clicking LS, for example(the ls command file in /bin) opens a small windows with a series of checkboxes and radio buttons that had all the LS options... at the bottom of the window there is a text field of the command that is built by adjusting the various options... When ready, you can click the LS button and execute the customized command in a terminal window...

      I really wish Apple would bring this back... just because it is so damn cool an idea.

      This page has more information, halfway down.

    50. Re:Word Count in Word by UserGoogol · · Score: 1

      It's not exactly an either-or proposition. In most window-based GUIs, you have the the features listed either in a toolbar or by right clicking. Very often, next to a feature, they will list some sort of keystroke for doing the feature. (Ctrl-V for paste, Ctrl-Z for undo.) This sort of thing could probably be extended to bringing up a pop-up command line. And maybe you could even find documentation for each command by right clicking on the menu.

      --
      "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
    51. Re:Word Count in Word by Anonymous Coward · · Score: 0

      I get it now! In order to be able to use a system, I need to be able to have access to a massive network of gigabytes of information! Good...that makes much more sense than having it right there in front of me.

    52. Re:Word Count in Word by Anonymous Coward · · Score: 0

      That assumes you know how to use the damn switches. This is what stops me from using CLI. I am not a normal Slashdot user. I didn't study programming. Give me a list of commands and man pages and I'll screw up because I don't know what syntax it expects. Man pages don't tell you a thing about how to structure your lines, what values are allowed, when you need to enter quotes or brackets or whatnot. The man pages are not enough!!

      With a GUI, your choices are constructively constrained. With a CLI, if you don't know the language, syntax, and structure, there is only one right way to enter the command and a nearly infinite number of wrong ways, and that's death to a beginner trying to get something done.

    53. Re:Word Count in Word by Anonymous Coward · · Score: 0

      GUI is like automatic transmission. It makes most things easier. I'm glad most people use 'em (both).

      Power users/drivers will always be able to get more performance out of a CLI/manual transmission. :)

    54. Re:Word Count in Word by jacksonj04 · · Score: 1

      I find a combination of everything far more effective than one or the other. I use a GUI for getting things done, because nice as the theory is web development and graphic design do not adapt well to CLIs. On the other hand, I get extremely annoyed when I cannot get to a CLI if I want to do something simple behind the scenes (such as on the machines at my school). There is no "GUI is better" or "CLI is better", just "Mixed interfaces cream everything else in most situations".

      That given, all my servers are managed exclusively through SSH, and my palmtop completely lacks a CLI.

      --
      How many people can read hex if only you and dead people can read hex?
    55. Re:Word Count in Word by Anonymous Coward · · Score: 0

      And how long do MS word or open office take to start? What about sed, cut, grep and awk? -5 not really insightful at all!

    56. Re:Word Count in Word by Anonymous Coward · · Score: 0

      Which has absolutely zero impact on the posters point, you twit. The article author asked a stupid question and got a stupid answer.

    57. Re:Word Count in Word by halosfan · · Score: 2, Interesting

      Amen.

      I remember when my then about a year-old kid would point at something and then point at where she wants me to move it to. "Cut and paste," I figured.

      Now that she can speak, she doesn't use the various variations of the sign language she developed early in her life.

      The same thing happens with software: for a novice user, point-and-click, cut-and-paste and drag-and-drop are of course the only way they can interact with an unknown product. However, as the user finds out more about the product, point-and-clicking becomes too tedious. For example, when using Word, one would first go to the Format menu or to the toolbar to make text italic. However, sooner or later, people tend to switch to Ctrl-I as it is faster.

      Command line (and not any command line, but something as powerful as a Unix shell with the Unix tools) is Ctrl-I equivalent for tasks more complex than making text italic.

      Another way to think of that would be standard Windows calculator. It lets you punch the buttons with the mouse, which is what most users do. Those who have to do it enough times, start using keyboard. Those who do it enough times with longer expressions, start using bc, or a python interpreter, or another calculator capable of accepting complex expressions.

      This leads me to a related point: one needs to know the language accepted by the command line to be able to use it. When the language has only one word ("Ctrl-I"), most people can learn it by accident. When it involves parentheses and plus/minus signs (calculator), learning the language may require some primitive thinking in addition to an accident, and fewer people bother to do that. Even fewer people bother to pick up a book on shell and learn it to be productive in command line.

      What is sad here is that every day at work I see people who use Unix (Solaris) as part of their jobs. Not knowing how to edit the command line, or how to work with the history, entering every new command is a torture to them. As soon as I explain them how to edit the command line in ksh or how to run and work with bash, they instantly become more productive. What prevents most of them from learning this by themselves, is beyond me. It is even more puzzling as one of my colleagues is a lady in her fifties, who had never touched Unix until a couple years ago. Yet, she picked up a couple books, and now is as comfortable with command line as I am...

      --
      My only problem with Microsoft is the severity of bugs in their software.
    58. Re:Word Count in Word by That's+Unpossible! · · Score: 1

      I see where you're going, but that's an over-simplification of a GUI, isn't it? There are plenty of things that could never translate to a commandline, regardless of how many keys you have on your keyboard.

      --
      Ironically, the word ironically is often used incorrectly.
    59. Re:Word Count in Word by Anonymous Coward · · Score: 0

      wc, Word, and OpenOffice all have it wrong.

      There are a number of editors out there (for instance Mellel) which give you live word count in a small, unobtrusive window instead of having to actually press a button, or mouse a menu item, or type a command every time you want a word count.

    60. Re:Word Count in Word by mclaincausey · · Score: 1

      Actually, there's a running tally of the word count in the bottom toolbar of both versions of Word for OS X, but it just has the number down there without explicitly saying "Word Count" next to it, so perhaps some folks might never notice.

      "Gee, what's that number that keeps getting bigger as I type this memo?"

      There are plenty of things that can be done easier in the command line than the GUI, he just picked a bad example.

      --
      (%i1) factor(777353);
      (%o1) 777353
    61. Re:Word Count in Word by AKAImBatman · · Score: 1

      As I said, it's only *part* of GUI design. There's also document interface and visualizations as well as sensory access to computer functions (i.e. I can "see" how to make a computer do something). Pretty abstract concepts, but three of them do cover pretty much all GUIs. :-)

    62. Re:Word Count in Word by poot_rootbeer · · Score: 1

      Why is that so hard? It's File -> Properties -> Statistics in OpenOffice.

      You just answered your own question.

      The problem is not that it's hard to count words in a particular word processor. The problem is that every application has its own unique ideas about how a word counter should be implemented and what the user should do to run it. The user's knowledge isn't transferable.

    63. Re:Word Count in Word by Headw1nd · · Score: 1

      No, take a look at this guy's replies to the comments on the parent post, and you'll see he's not joking. I know, it's hard to believe, but true.

    64. Re:Word Count in Word by Fahrenheit+450 · · Score: 1

      Great. Now try querying google with: word count "os x". And tell me how easy it is compared to looking through the menus...

      --
      -30-
    65. Re:Word Count in Word by Fahrenheit+450 · · Score: 1
      If you use an application for a longer period the GUI gets in the way in the long run. That's when a good CLI (or macros or similar) is more effective than clicking and clicking and clicking...

      And this all depends on the situation. Take something like iTeXMac. To compile a tex project with it, I hit Cmd-Alt-T. Much faster than switching to another terminal, typing pdflatex my_proj.tex, waiting for it to finish, typing pdflatex my_proj.tex again until it reaches its fixpoint, then refreshing my view of the resulting pdf.

      Even if I whipped up a script or makefile, its still going to be faster as I can do everything from within the same app. The command line has its uses, and GUIs have their uses. One is not strictly better than the other.

      --
      -30-
    66. Re:Word Count in Word by Angostura · · Score: 1

      Or look at the status line at the bottom of the screen where the number of words is always displayed.

    67. Re:Word Count in Word by Anonymous Coward · · Score: 0
      " Pick an obscure task that almost nobody needs done, stack the "other" side with an unusual configuration for modern computers and use it as a case in declare that "your" way is a lot better in general."

      Hey what's you problem? After all this is apple.slashdot.org. You know, the place where a one-button mouse + keyboard shortcuts is better than a 3button mouse with scroll-wheel or the startup/plist is way better than rc.local or if you load a 4M word document into wordX with interactive spell check on the dual 2G G5 grinds to a crawl but wordX is way bettter than word on windows.

    68. Re:Word Count in Word by prog-guru · · Score: 1
      To count how many files under your home directory are named foo, you can do find ~ -type f -name "foo" | wc -l

      That's easy, my home directory can only have one file named foo, not counting sub directories ;)

      --

      chris@xanadu:~$ whatis /.
      /.: nothing appropriate.

    69. Re:Word Count in Word by zaphod_es · · Score: 1

      Are you including the time to load (Open) Office? Why must it be either/or? When Oo is open I would do what you suggest. When it isn't I would use the command line. Most Mac users could increase their productivity by learning to use a few commands and a few keyboard short cuts. Closed minds cling to the point and click solution to any problem. ZB

    70. Re:Word Count in Word by Anonymous Coward · · Score: 0

      Find. Your. Mouse?

      I hate to break the news to you, but 99.9999% of PCs on the face of this planet have a mouse attached to them 24/7.

      In other words, great, I find it interesting that you're in the .00001%, and I'm happy to hear that something works faster for you, but guess what - there's 15 people on the face of the planet with your particular set of hangups, so maybe instead of offering pointless advice to the other 6 billion people, you should form a support group.

    71. Re:Word Count in Word by Guy+Harris · · Score: 1
      See *most* of us "Unix guys" really don't even use a gui.

      And some of us "Unix guys" (since 1977 or so, in my case) use GUIs for some things and CLIs for others. For my collections of various documents (network standards documents, for example), I use the KDE and OS X GUIs - it's easier to browse through and find the document I want rather than wasting an xterm/Konsole/Terminal window that could be better put to other purposes.

      On the other hand, my OS X desktop is often cluttered enough with windows obscuring the desktop that it's easier to open a document by pushd-ing to ~/Desktop, running open on the file in question, and popd-ing back to whatever I was doing. (If I already know what the file name is, or if I know what it begins with so I can find it with file name completion, the terminal window is in use for a sufficiently short period of time that the problem mentioned in the previous paragraph is a small problem.)

      So the answer, much though it might peeve those with a particular ideology (regardless of whether the ideology is "CLI bad, GUI good" or "GUI bad, CLI good"), is "it depends".

    72. Re:Word Count in Word by FosterKanig · · Score: 0

      I'll bite. How do you not use a keyboard?

    73. Re:Word Count in Word by jamwt · · Score: 1
      % apropos "word.*count"
      wc(1) - word, line, character, and byte count
    74. Re:Word Count in Word by jamwt · · Score: 1

      Oops.

      Look at your sibling!

    75. Re:Word Count in Word by goatbar · · Score: 1

      CLI for some, gui for others... I spend lots of time editing in emacs and then telling the GUI from the command line to show me the results. M-x shell then open foo.html. It always get frustrated when I finally have to resort to photoshop or illustrator. How many times I have I spent hours to make a figure just right, when the advisor says, why didn't use include these other data points over here? Could you redo it with those... if everything I did was CLI based, it's just a quick matter of re-running the bash script. If it's Illustrator/Photoshop, it's an hour of wrist pain with the mouse.

      "open" rocks

    76. Re:Word Count in Word by goatbar · · Score: 1
      "And this all depends on the situation. Take something like iTeXMac. To compile a tex project with it, I hit Cmd-Alt-T. Much faster than switching to another terminal, typing pdflatex my_proj.tex, waiting for it to finish, typing pdflatex my_proj.tex again until it reaches its fixpoint, then refreshing my view of the resulting pdf."

      How about M-x compile (which I alias to C-x C-e), put in the pdflatex command once with && open my_proj.pdf at the end. Then Apple-Tab back to X11. Works wonders.

    77. Re:Word Count in Word by Anonymous Coward · · Score: 0

      hahahaha! I think that's a funny comment, he did not mean to be insightful. I hope.

    78. Re:Word Count in Word by RogL · · Score: 2, Interesting

      Nonsense! A GUI is a *great* way to organize a few dozen xterms. :-)



      I think you were kidding, but... I was working with mixed DOS & UNIX boxes, from a PC desktop, when Win3.1 came out.



      My first reaction was "Wow, a great way to run programs at half-speed!" After trying it out for a week, I loved it: I could run a DOS app, a couple terminal windows to the UNIX boxes, and keep a Carbon Copy (PC remote-control over 2400-baud dialup) session going to troubleshoot a client. Stuck with console apps to avoid X overhead (we were running UNIX on Intel PCs - we needed every bit of resource we could get!)


    79. Re:Word Count in Word by Fahrenheit+450 · · Score: 1
      a: I'm not too familiar with doing this inside of emacs, but when I ran a similar procedure from vim, it only ran through the compile phase once, not to fixpoint, so I had to run multiple times if there were, say, undefined references. iTeXMac does this for me (unless I hit Cmd-Alt-C or click on the big "C" at the top of the window, which only compiles once then displays the result), does your Meta-x compile method?

      b: It's still (slightly) less efficient than the iTeXMac method, which is one keyboard chord, and completely contained within one app. Additionally if I need to run bibtex again for the current document, I hit Cmd-Alt-B (Then Cmd-Alt-T if I want to typeset the result). What do you have to do in emacs? And what if you have to switch back and forth between compiling a metpost document to generate an image for inclusion in your original document, and the original document? I'm guessing you really lose out on efficiency in a case like that.

      c: That is, of course, using an application, and not doing the work at the command line, where you at best have the aid of history or makefiles to save you time.

      d: This wasn't really meant to be a pissing contest for shaving keystrokes anyway. It was more to point out that there are some applications that are better suited to a GUI than a CLI (and not just things like Photoshop). For example, browsing web pages. Yes, we have things like links (which I use an awful lot, actually), but it is a complete pain in the ass to use it on pages with screenfuls of links on them and you need to navigate to say the 43rd out of 100 -- and how about if you wanted to email a picture from a web page to someone? Not so easy in links, with Safari and Mail, it's a simple drag operation. And what is the CLI equivalent of something like Quicksilver? I suppose you could whip up something similar using curses (shudders at the thought), but you'd need to keep an extra terminal window open or use screen for it.

      --
      -30-
    80. Re:Word Count in Word by E_elven · · Score: 1

      Also, GUI does not always preclude CLI. I frequently steal away a few glances at the web while doing something useful, and while lynx is a fine browser, I usually start up a wm to run ff and a few terminal windows in which I work. I've never gotten around to using actual GUI system config tools/database managers/whatever, though.

      --
      Marxist evolution is just N generations away!
    81. Re:Word Count in Word by PopCulture · · Score: 1

      yeah, I didn't want to argue to the rest of the world that windows really runs fine without a keyboard either. In most cases, I use term serv or ssh.

      --

      Here's to finally giving Bush his exit strategy in November
    82. Re:Word Count in Word by goatbar · · Score: 1
      didn't mean to knock other ways of doing things. just meant to give some options... I used texshop when I wrote a paper with latex recently

      In my .emacs file I have

      (global-set-key [f1] 'compile)

      Which lets me do fn-F1 to run make. then I can type what ever and use the up arrow to get previous commands. was a long time using emacs before i discovered that there are may history like features running through emacs. there is probably a way to do explicite commands, but i'm not that great of a lisp hacker. You can set a default command for compile other than make -k by putting something like this in your .emacs

      (setq compile-command "make ")

      Someone who is better with emacs want to jump in?

      It's pretty amusing (and not always the most fun) to be required to use lisp to configure my editor. But for me it's worth it. Just turned someone buying me a copy of BBEdit Pro.

      Often when I teach new unix users emacs, 1st they hate me. "Why do I have to use that evil program" Then a couple weeks later, I usually get a thank you (or they ignore me for ever after :) It's definitely not worth learning if you will only being using it just a little bit. Just don't use the IRIX jot program -- I really hate that thing.

    83. Re:Word Count in Word by Anonymous Coward · · Score: 0

      In my .emacs file I have

      (global-set-key [f1] 'compile)

      Which lets me do fn-F1 to run make. then I can type what ever and use the up arrow to get previous commands.


      I also bind "recompile" to a key which starts the compilation immediately with the same options as before. It's more useful than compile in most of the cases.

      Taking your example I bind F1 to recompile for quick recompilation and Shift-F1 to compile in case I want to modify the compilation command.

    84. Re:Word Count in Word by plog · · Score: 1, Informative
      And some of us "Unix guys" (since 1977 or so, in my case) use GUIs for some things and CLIs for others.

      I'm a 'desktop guy' but I first dicovered computers through TeX in 1980, and keep a Terminal window open half the time. I too bounce back and forth.

      Then there's Quicksilver on OS X, with its hybridity; keyboard control full of CLI hooks, anticipatory bold-and-fast GUI feedback, and it's now being extended well past a search/launch core function. It's both GUI and CLI and neither.

      I'm using it more and more on its own. File name completion good iconic feedback really makes things feel instantaneous.

      I enjoy the tired old desktop, but I'm hoping something like Quicksilver will replace it.

    85. Re:Word Count in Word by jgrahn · · Score: 1
      Tools -> Word Count

      Note that the silly "it's hard to cound words in Word" argument was the reviewer's, and not as you were led to think a quote from "In the beginning ...". Neal Stephenson had more subtle things to say about why it's good to have small filters like wc(1).

    86. Re:Word Count in Word by Anonymous Coward · · Score: 0

      We where talking OSX or what

    87. Re:Word Count in Word by Anonymous Coward · · Score: 0

      BEER! Beer Beer Beer Beer Beer!!

    88. Re:Word Count in Word by Anonymous Coward · · Score: 0

      In most cases, I use serial ports or ssh.

      Dipshit!

    89. Re:Word Count in Word by TCM · · Score: 1

      Good. Now do it for 10000 files and create a report from that.

      Or do it for files named after some pattern and created after a certain date.

      --
      Of course it runs NetBSD. BTC: 1NT7QvbetmANwaMzhpVL6
    90. Re:Word Count in Word by AKAImBatman · · Score: 1

      Q: Do you people go around trying to piss me off?

      The author made a dumb comment and was refuted for it. Which has absolutely NOTHING to do with the relative benefits of Word vs. 'wc'.

  2. Linguistic origins by 2.7182 · · Score: 3, Informative

    In an old paper by Ritchie, it is pointed out that Unix comes from the Old Dutch, Unochs, which means "tree-based".

    1. Re:Linguistic origins by ikewillis · · Score: 2, Informative

      Wrong. The name Unix is an abbreviation of UNICS, which stands for UNiplexed Information and Computing Service, a play on MULTICS, MULTiplexed Information and Computing Service

    2. Re:Linguistic origins by phloydde1 · · Score: 0

      I thought it came fron eunuch.

    3. Re:Linguistic origins by Feminist-Mom · · Score: 1

      No, I am afraid that you are the one who is wrong. That is a common misconception, that Ritchie is trying to clear up.

    4. Re:Linguistic origins by winkydink · · Score: 1

      Well he's being awfully quiet about it. There's no mention of it on his home page.

      --

      "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    5. Re:Linguistic origins by winkydink · · Score: 1

      That was the double-entendre in UNICS

      --

      "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    6. Re:Linguistic origins by AKAImBatman · · Score: 1

      1. Ken Thompson created and named it after he felt that the MULTICS project was too complex. Ritchie came later and did the C compiler.

      2. Have a link? Here's mine: http://www.uwsg.iu.edu/usail/concepts/unixhx.html

    7. Re:Linguistic origins by Anne+Thwacks · · Score: 1

      I think the old English word Bo-Lucks comes to mind!

      --
      Sent from my ASR33 using ASCII
    8. Re:Linguistic origins by Kiryat+Malachi · · Score: 1

      *Nice* troll.

      (Is 'unochs' really Dutch for 'tree-based'?)

      --

      ---
      Mod me down, you fucking twits. Go ahead. I dare you.
      (I read with sigs off.)
  3. Command line in OSX by trisweb · · Score: 2, Insightful

    Just the other day I was fixing a friend's mac, and while I hadn't used OSX all that much, I do use linux, so I asked him, "okay, open up a terminal" because I knew it was possible, and it was so nice to be able to use (just about) everything I could in linux. It's definately something I wish Windows had...

    --
    "!"
    1. Re:Command line in OSX by 2.7182 · · Score: 1

      Windows does have it - look at www.cygwin.org.
      Cygwin is Unix tools for windows.

    2. Re:Command line in OSX by Anonymous Coward · · Score: 0

      You could have your own rap song:
      I'm sorry mama, I'm coming out of the closet.

    3. Re:Command line in OSX by rppp01 · · Score: 1

      I use it at work. With 'X', ssh, and so on.

      It 'works' for the most part. I get issues with 'X' and things like WebSphere installers and Admin GUI clients.

      But for straight command line that is pretty seemless with Windows, I agree, it works very well.

      MS's SFU is a hunk of junk by comparison.

      --
      They stuck me in an institution, said it was the only solution, to...protect me from the enemy, myself
    4. Re:Command line in OSX by trisweb · · Score: 3, Interesting

      Oh yeah, well I know and love Cygwin, but you can't exactly go up to anyone's system and say "okay, now open up a Cygwin terminal... ... Oh, what's that, you have no idea what I'm talking about because it doesn't come with Windows and isn't attached to Internet Explorer?"

      I manage a dorm network with 44 computers, mine is the only one with cygwin installed, I guarantee it. So it's nice to go up to a Mac, open a terminal, and have it be useful.

      --
      "!"
    5. Re:Command line in OSX by DavidLeblond · · Score: 1

      Are you seriously saying that cmd in Windows is as functional as a terminal on Linux/Mac?

      Wow.

    6. Re:Command line in OSX by NardofDoom · · Score: 2
      An even better reason to learn the command line on your Mac is so you can SSH into it from a remote location. I use this all the time at work to download software updates and files. Right now I'm downloading NeoOffice to play with later.

      I can also administer it remotely. Handy for when my wife has some sort of problem with something, or when I have a spare minute and want to do something on my home computer.

      --
      You have two hands and one brain, so always code twice as much as you think!
    7. Re:Command line in OSX by calibanDNS · · Score: 1

      It would be great if windows could ship with a functional, unix-like CLI instead of the barely usable system that ships. Until that day (which may never come), if you have to use Windows there are alternatives.

      For starters, try Cygwin. I keep this on my work Windows boxes. It's a lot to install though, so I don't recommend carrying it around on CD to put on other peoples' PCs.

      When working on other peoples' PCs, consider carrying the -tiny branch of UnitKit for Windows around on a USB flash drive.

    8. Re:Command line in OSX by Anonymous Coward · · Score: 0

      Absolutely. I use my OS X machine as "just another Unix", among my FreeBSD and Linux machines at home (as well as all the Solaris, Tru64 and HP-UX at work).

      Windows machines just make things unnecessarily hard and incompatible.

    9. Re:Command line in OSX by Anonymous Coward · · Score: 0
      When working on other peoples' PCs, consider carrying the -tiny branch of UnitKit for Windows around on a USB flash drive.

      Fortunately I don't have a Windows box at home so I can't try it out, but I think that you, good fellow, have just saved me from a lot of unnecessary suffering. Thank You.
    10. Re:Command line in OSX by Kehvarl · · Score: 1

      My only problem with cygwin is: after about a week of searching google and testing stuff on my own, I finally get enlightenment to compile and install, and it crashes as soon as it's done loading. If we had a working enlightenment install for cygwin, I'd be happy (as happy as I can be on a winXP machine anyway.).

    11. Re:Command line in OSX by CerebusUS · · Score: 1

      Hopefully Monad will fit the bill for a highly unix-like CLI

      developer.com article here

      I fully expect a rash of complaints about how it won't be "unix-y" enough, though :-)

    12. Re:Command line in OSX by pilgrim23 · · Score: 1

      Apple has had a command line since the beginning: CALL -151 to drop to the monitor, 3D0G to get back. Of course in GS/OS one must launch Basic.System to drop to the prompt. Terminal? pish posh! ProDOS rulz! :)

      --
      - Minutus cantorum, minutus balorum, minutus carborata descendum pantorum.
    13. Re:Command line in OSX by windermere · · Score: 1
      Trisweb,

      Okay you may say that I have been living under a rock for some time... but I had never heard of Cygwin until I read your post here -- you just made my day!

      Cheers, D.
  4. Yep! by stratjakt · · Score: 1

    Think: do you know how to count the words in a Word file?

    File->Properties, Statistics tab

    Pages, Paragraphs, Lines, Words, Charachters with or Without Spaces.

    What's my prize?

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:Yep! by Anonymous Coward · · Score: 0

      Well, you could go to all that trouble, or you could just observe the status bar and read the word count there.

      But, I'm sure some people are not clever enough to have enabled that.

  5. Count words in BBEdit by Anonymous Coward · · Score: 3, Informative
    BBEdit is a little easier, if you know the button to click.


    Yea, the big freaking button with "i" in a circle right in the middle of toobar. It will tell you characters, words, lines and pages. Even easier and faster to use than wc.

    1. Re:Count words in BBEdit by Ignignot · · Score: 1

      Don't pay any attention to Stephenson. From the length of his recent books, you can guess why his favorite tool is word count.

      Stephenson - 2 cents per word, that's another $200,000 in the bank!

      Note: I love stephenson's books.
      Subnote: I am not karma whoring with my above note.
      Sub-subnote: yes I am.

      --
      I submitted this story last night, and it didn't get posted.
    2. Re:Count words in BBEdit by Lord+Flipper · · Score: 1

      it's my default editor in the Terminal, friggin' great.

  6. Another fantastic read. by Anonymous Coward · · Score: 0

    Eight thumbs up!

  7. wc gui analog by gnurb · · Score: 1
    I predict by the end of this discussion either one will be found, or one will be programmed.

    Also, buy the book at Amazon and save a good 4 bucks compared to BN. Yeah, that's an affiliate link in there you weenies

    --
    hooray! it's a sex wiki
    1. Re:wc gui analog by evn · · Score: 2, Interesting

      To get things started, I whipped one up with 15 lines of applescript. For those too lazy to open up AppleScript Editor I posted a 'compiled' version.

      Just add extract and toss on your desktop or in your dock: drop files on to see the wc magic. Source code follows:
      on open (somefiles)
      try
      repeat with afile in somefiles
      set realpathtofile to POSIX path of afile
      set wcresult to do shell script ("wc " & realpathtofile)
      set displaymessage to "File: " & realpathtofile & "

      Lines: " & first word of wcresult & "
      Words: " & second word of wcresult & "
      Characters: " & third word of wcresult
      display dialog displaymessage with icon note
      end repeat
      on error errormessage
      display dialog errormessage
      end try
      end open
      I know you were half-joking, but when it's so easy, why not?
    2. Re:wc gui analog by fussili · · Score: 1

      Your prediction has been startlingly vindicated! I just wrote a GUI wrapper for you.

      You can get "wc for the rest of us" here:

      http://www.whatcomestopass.com/wcfortherestofus.si t

      Just open it, select a file and it'll run a shell script for "wc -w" and show you the results.

      Gotta love Applescript!

    3. Re:wc gui analog by fussili · · Score: 1

      Gah, that first reply wasn't there when I wrote my feeble script - parent post is redundant. To the winner go the spoils and geek kudos ;)

  8. Re:OSX by Anonymous Coward · · Score: 0

    Considering that BSD is the roots of the modern System V Unix, I think you have a pretty weak case there.

  9. Do you know how to count words at all? by YU+Nicks+NE+Way · · Score: 4, Informative

    Did you know that the number of words in a document is not a single value, but depends on the use of the document? I'm sure that Stephenson does know that: if you're writing for some audiences, you don't count the words in foot- or endnotes, whereas for others, you do. If you're writing for some audiences, you don't count "short words", whereas for others, you do.

    And, of course, if you're writing in Japanese, wc counts your entire document as being one word long.

    What does this have to do with Unix? It's a classic example of Einstein's dictum that everything should be made as simple as possible, but no simpler. The Unix command wc is a classic exmple.

    1. Re:Do you know how to count words at all? by geoffspear · · Score: 1

      And wc does a very poor job of counting the words in a Word document, too. Not to mention an HTML document.

      --
      Don't blame me; I'm never given mod points.
    2. Re:Do you know how to count words at all? by cortana · · Score: 1

      Perhaps you should pass your document through a program that converts the content to text first?

      cat blah.html | html2txt | wc
      cat blah.doc | deword | wc

      Ok, I made deword up, because I forgot the name of the program that makes a Word document in to text.

    3. Re:Do you know how to count words at all? by cortana · · Score: 1

      The only problem I have with using LaTeX is that there is seemingly no way to accuratly count words. I ended up with the following:

      alias texwc='dvi2tty report.dvi | sed "s/\. \.//g" | sed "s/ \. //g" | sed "s/ [A-Za-z]*-$//" | sed "s/.*_$//" | wc -w'

      Pretty nasty! The seds remove the junk that artificially inflates the word count the most, like page numbers, page headers and the table of contents. What I really need is something like:

      dvi2tty --for-screen report.dvi | wc

      where --for-screen makes dvi2tty format the output for a screen rather than for printing to a line printer. Ironically this would make it perform the function that its name matches! :)

    4. Re:Do you know how to count words at all? by pthisis · · Score: 1

      Hi Geoff, long time no see.

      catdoc filename.doc | wc -l

      (or lynx -dump filename.html | wc -l)

      Of course you knew that. It _is_ a stupid example. Both examples here demonstrate part of the point: the strength of the command line isn't in wc, it's in being able to chain together simple commands easily to accomplish complex tasks.

      And the strength of the GUI is in making the simple tasks trivial.

      (catdoc is at http://www.45.free.net/~vitus/ice/catdoc/ ; I used to use it successfully to read Word documents I got as attachments from people, but I haven't gotten one in years).

      --
      rage, rage against the dying of the light
    5. Re:Do you know how to count words at all? by Jeff+DeMaagd · · Score: 1

      I think for Japanese, each sentence might count as one word, two words if it wraps onto a new line. But you certainly are correct, you can't count spaces, carraige returns, etc. as the only means of marking word boundaries. For Japanese, it is somewhat complex as you need to detect character set shifts, from kanji to katakana to hiragana to romaji and back to any of them, and not all of those character shifts necessarily mean a new word, verb endings change too. Then you'd also have to account for the character coding of the file, there are three dominant codes, I think.

      Ouch, I hadn't considered how complex it would be to program such a simple thing.

    6. Re:Do you know how to count words at all? by geoffspear · · Score: 1

      So I need to compile another program to use wc to get the same results I get from Word. Kind of hurts the author's case there.

      --
      Don't blame me; I'm never given mod points.
    7. Re:Do you know how to count words at all? by YU+Nicks+NE+Way · · Score: 1

      What about footnotes? Does the TOC count in the word count, or not? Does an APA citation count as a single word, or as two or more?

      Paradoxically, word counting is a particularly hard problem from dvi, precisely because it's a display-oriented format, not a content-oriented format.

    8. Re:Do you know how to count words at all? by NoOneInParticular · · Score: 1

      A bit messy and maybe not to your liking as well, but have you tried chaining dvi2ps and ps2ascii?

    9. Re:Do you know how to count words at all? by pthisis · · Score: 1

      Definitely. His example sucked.

      But fundamentally, I have yet to see a good GUI constructor to build the same kinds of data flow pipelines that the Unix command line offers. There's no inherent technical barrier, but it's a pretty hard UI problem. I would love to see a good solution.

      --
      rage, rage against the dying of the light
    10. Re:Do you know how to count words at all? by crumley · · Score: 1

      Personally, when I count words in LaTeX I avoid the .dvi step. I use either the simple untex or the prettier hevea to go from LaTeX to plain text. This avoids the problem of page numbers and references, though it has some other issues.

      --
      Preventive War is like committing suicide for fear of death. - Otto Von Bismarck
    11. Re:Do you know how to count words at all? by Anonymous Coward · · Score: 0

      If you want to count words in MS Word you need to buy and install MS Word. So there!

    12. Re:Do you know how to count words at all? by Kehvarl · · Score: 1
    13. Re:Do you know how to count words at all? by Anonymous Coward · · Score: 0

      Count these words...

      Gooly

      Licker

  10. Mac and the command line by crimson_alligator · · Score: 1

    The above did not mention Darwinports, an excellent alternative to Fink. http://darwinports.opendarwin.org/

    I live in the terminal on my ibook. Darwinports provided wget, unison, tin, links, mutt, irssi, anacron, and a ton of other Unix stuff. Of course Macs already come with vim, emacs, and the ability to alias emacs='vim'.

    Roll up your sleeves and open that terminal!

    1. Re:Mac and the command line by geoffspear · · Score: 1
      Only a fan of vi could be dumb enough to forget that emacs isn't his favorite editor, and need to alias it to prevent accidentally running emacs.

      An emacs fan would never even consider typing "vi" on the command line.

      --
      Don't blame me; I'm never given mod points.
    2. Re:Mac and the command line by Anonymous Coward · · Score: 0

      Wow the ability to alias.. What a world class OS.

    3. Re:Mac and the command line by Anonymous Coward · · Score: 0

      Wow the ability to alias. What a world class OS.

    4. Re:Mac and the command line by alfredo · · Score: 1

      You forgot Pico!!! Or is that Poland?

      --
      photosMy Photostream
    5. Re:Mac and the command line by crimson_alligator · · Score: 1

      That is a systemwide alias for the mere users.

      If you weren't an emacs user, perhaps you would be familiar with the distinction!

    6. Re:Mac and the command line by geoffspear · · Score: 1
      Oh, so you're a fascist sysadmin who tries to force his users to use a tool they don't want to. Why not just alias emacs to "rm -rf ~" while you're at it?

      I can just see some poor user in a beginning lisp programming course stuck in a editor he doesn't know how to quit. Or start typing text into.

      --
      Don't blame me; I'm never given mod points.
    7. Re:Mac and the command line by crimson_alligator · · Score: 1

      Delightful! Maybe you could be a BOFH after all.

      On the other hand, a BOFH is usually able to tell when someone is joking.

      I'll duck out before 'Hitler' gets mentioned. Feel free to have the last word.

    8. Re:Mac and the command line by umshaggy · · Score: 1
      That depends. If you are configuring a thin client, or [mostly] dumb X terminal, or a barebones rescue boot OS, it is VERY likely that vi will be available and emacs will not. vi pre-dates emacs, and is generally considered an essentiall low level system tool. emacs is great for power editing, customization, and for getting gui style multi-tasking when you don't have a GUI, but it isn't as universal.

      Note that have NO problem with emacs, even though I am a vi user (for some of the reasons mentioned above, but mostly because in the first unix book I read, the chapter on vi came first and once I knew how to use one powerful text editor, I didn't have the patience to learn another:)

      But I agree with the sentiment about the alias. Why would anyone want to type emacs to launch vi? That is just willfully making your computer less usable.

      --
      Did you buy a Neuros today?
    9. Re:Mac and the command line by Ford+Prefect · · Score: 1

      You forgot Pico!!! Or is that Poland?

      I'm pretty sure pico came pre-installed on my iBook.

      Quite fortunate, as I absolutely loathe both vi and emacs. ;-)

      --
      Tedious Bloggy Stuff - hooray?
    10. Re:Mac and the command line by geoffspear · · Score: 1

      If I need a small barebones editor, I'll use ed, thank you very much. I love its minimalist UI.

      --
      Don't blame me; I'm never given mod points.
    11. Re:Mac and the command line by umshaggy · · Score: 1
      Hell, if you really need to strip it down, you could always use cat! :)

      Point is though, that vi is standard on most barebones environments. I once had to set up a bunch of X servers that were talking to some specialized hardware. All their configs got messed up and I ended up with a > prompt, no shell, and about the only things on their tiny HDs were sh, vi, and some config files. Fortunately that was enough to make everything proper. Granted, this isnt' to say that emacs would not have worked just as well had it been installed instead, but emacs is not quite the historical standard that vi is. I can just about guarantee that any system that has emacs will have vi. The converse is not true.

      --
      Did you buy a Neuros today?
    12. Re:Mac and the command line by malthusan · · Score: 1

      Ya damn skippy.

    13. Re:Mac and the command line by Anonymous Coward · · Score: 0

      Give me joe, or give me death. Well, actually, I'll take pico before death. But not vi!

  11. Mac vs Unix by rppp01 · · Score: 3, Interesting

    I have used Unix, Linux and Windows for years. I recently switched to Mac at home.

    I find it uncomfortable for obvious reasons (new way of doing things). Yet, while I only do file movement, touches, etc via the command line in unix/linux, and I only do GUI file touches, movement, etc on Windows, I find myself using an unwieldy GUI (Finder) to do the same thing on Mac. I can fire up an xterm and do it that way, but I don't 'want' to.

    That is odd for me. Can't quite explain it. Mac is (even as a unix variant) its own creature. It leaves me feeling like I have the power of the universe in a little pretty living space.

    Maybe cause I am new to it still.

    --
    They stuck me in an institution, said it was the only solution, to...protect me from the enemy, myself
    1. Re:Mac vs Unix by Anonymous Coward · · Score: 0

      If you have a spare PC, maybe you might want to try FreeBSD on it. There are some slight differences between the FreeBSD command line interface and some of the Linux distribution interfaces that you may prefer. Mac OS X/Darwin is very loosely based on FreeBSD. I like Mac OS X/Darwin because it reminds me of the good old SunOS 4 days.

    2. Re:Mac vs Unix by WoodSmoke · · Score: 2, Funny
      It leaves me feeling like I have the power of the universe in a little pretty living space.
      PHENOMENAL COSMIC POWER!... itty-bitty living space " - the Genie (Djini?), from Disney's Aladdin.
    3. Re:Mac vs Unix by ViolentGreen · · Score: 1

      I agree. Finder is seriously lacking with respect to the power of explorer. Explorer is the best file manager that I have ever used (though it could be because I used it for so many years before branching out.) Finder is missing a lot of stuff that I find basic. The biggest that I can think of is the lack of a keyboard-based copy/cut/paste. I would kill for a cmd+c in finder.

      There are finder replacements out there. There was one shareware application (I can't remember the name) that had a very similar look to finder but added features. It came highly recommended but I had to turn it away. The problem was that it added too many features and I didn't see it as worth my time to learn.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    4. Re:Mac vs Unix by SlamMan · · Score: 1

      Wha? You can cmd+c all you like in the finder, works great.

      --
      Mod point free since 2001
    5. Re:Mac vs Unix by jpkunst · · Score: 1

      Wha? You can cmd+c all you like in the finder, works great.

      I was about to say the same thing. And depending on where you paste (Cmd-v) it, you either copy the filename (if the name of another item is selected) or you can copy the file itself (same as Cmd-d, Duplicate).

      JP

    6. Re:Mac vs Unix by ViolentGreen · · Score: 1

      I'll have to try that when I get off work. I know I can't do a cmd+c then cmd+v to paste a file. I'm pretty sure that there's no keyboard shortcut to move (cut/paste) a file either.

      I'd love for you guys to prove me wrong though.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    7. Re:Mac vs Unix by georgewad · · Score: 1

      Um, cmd+c, cmd+v works perfectly in the finder. I just moved a file a second ago.

      --
      Karma: It's not just a good idea. It's the law.
    8. Re:Mac vs Unix by mr+i+want+to+go+home · · Score: 1
      "Finder is seriously lacking with respect to the power of explorer. Explorer is the best file manager that I have ever used"

      Errr - I can't quite tell if you're trolling, or you've only ever used Explorer. Hell, I used to get annoyed that even the FileManager that came with Win3.1 was more powerful than Explorer (and I am being serious).

      "Finder is missing a lot of stuff that I find basic. The biggest that I can think of is the lack of a keyboard-based copy/cut/paste. I would kill for a cmd+c in finder."

      Again, on the off chance that you're not a troll, "cmd+c" (notice, not "ctrl+c") does exactly what you want it too. Yes, in the Finder.

      IMO, one of the best things about the Aqua GUI is the ability to set keyboard short-cuts for anything.

    9. Re:Mac vs Unix by geoffspear · · Score: 1

      Since Windows machines don't even have a command key, I'm going to guess he's a troll.

      --
      Don't blame me; I'm never given mod points.
    10. Re:Mac vs Unix by mclaincausey · · Score: 2, Interesting

      Explorer is a rinkydink file manager managing an obsolete and obtuse file system for a kludgy operating system. Aqua/Finder, warts and all, is light years ahead of Windows and Gnome/KDE, IMO. Especially if you take the time to learn about some of its features that might not be obvious at first.

      But who needs a GUI when you can drop into a bash session anyway!

      --
      (%i1) factor(777353);
      (%o1) 777353
    11. Re:Mac vs Unix by Kesh · · Score: 1

      Copy & paste of files works just fine in OS X. Cut & paste does not exist, however.

    12. Re:Mac vs Unix by rppp01 · · Score: 1

      Actually, I swiped the line from that movie.

      Love that flick.

      --
      They stuck me in an institution, said it was the only solution, to...protect me from the enemy, myself
    13. Re:Mac vs Unix by Anonymous Coward · · Score: 0

      How is moving files unwieldy on the Mac? Drag, drop, just like in Windows.

      Unless you use that bizarre assed Cut/Paste BS. Which, while lame in concept, has proven useful to me in a couple situations. It's much slower than dragging the file, though.

    14. Re:Mac vs Unix by Repugnant_Shit · · Score: 1

      Ditto me. You get used to it after awhile.

    15. Re:Mac vs Unix by Maserati · · Score: 1

      IMO, one of the best things about the Aqua GUI is the ability to set keyboard short-cuts for anything.

      Incidentally, that's in System Preferences > Keyboard & Mouse > Keyboard Shortcuts. If you use Preview for PDFs, then set an f-key for "Zoom to Fit", that's very handy.

      --
      Veteran, Bermuda Triangle Expeditionary Force, 1992-1951
    16. Re:Mac vs Unix by JQuick · · Score: 1

      A previous poster told you the truth.

      Select a file.
      c to copy a reference to the clipboard.
      Select a directory.
      -v to paste the file.

      How is that difficult?

      Moving a file, is one of two things.
      Renaming, which is followed by the new name.
      Changing the parent folder of the file. In this latter case there is no key board equivalent (of cut), there is only drag and drop.

  12. Good points by SilentChris · · Score: 3, Interesting

    I recently got an iBook (recently as in 6 months ago) after installing a G5 for a user in our art department. I'm not sure I'm a big fan of Apple's hardware or pricing schemes ($600 for an iPod that plays photos), but Mac OS X is pretty robust.

    What I especially like about their use of the Terminal is pretty much anything that can be done in the OS, can be done on the command line. Example: changing a computer's name. Think fast: how does one do this in Windows? If you started saying "command line, net with options..." you know more than most. Windows coerces you to use the GUI. Mac encourages it, but doesn't force it (at least, since they got rid of OS 9).

    Not to mention the Fink project, which adds tons of great apps to the command line. Again, I'm no Apple zealot, but their decision to have a robust command line in OS X was a great one.

    1. Re:Good points by stratjakt · · Score: 1

      Windows coerces you to use the GUI. Mac encourages it, but doesn't force it

      Please, windows doesn't "force" you to use the GUI any more than Mac does.

      And your average user doesn't know how to do it in Mac either. I'm assuming its typing it in /etc/HOSTNAME, or probably - in true Unix fashion, this file is in some other folder and is named something totally differnent, right?

      In gentoo, you gotta screw around in /etc/conf.d to set the hostname. Slackware sets it up in one of its /etc/rc.d/* init scripts, etc.

      --
      I don't need no instructions to know how to rock!!!!
    2. Re:Good points by AKAImBatman · · Score: 5, Informative

      Not to mention the Fink project, which adds tons of great apps to the command line.

      Fink is nice, but it tends to make something of a mess. Even worse, that mess is mixed in with your current files, making it difficult to clean up later. I've found that http://packages.opendarwin.org works better. Don't access it through your web browser. just select finder, then click on the "Go" menu, then "Connect to Server...". Place that URL in the textfield and click "OK". You should now have a WebDAV archive of opensource binaries mounted on your desktop.

      Have fun!

    3. Re:Good points by bsartist · · Score: 3, Informative

      Even worse, that mess is mixed in with your current files

      Wrong. Everything Fink installs is found under /sw - *nothing* is "mixed in with your current files".

      --
      Lost: Sig, white with black letters. No collar. Reward if found!
    4. Re:Good points by justMichael · · Score: 2, Informative
      Fink is nice, but it tends to make something of a mess. Even worse, that mess is mixed in with your current files, making it difficult to clean up later.
      Umm, not to sound like an ass, but...

      1) Launch Terminal.app
      2) sudo rm -rf /sw
      3) Fink is nothing but a memory ;)
    5. Re:Good points by AKAImBatman · · Score: 1

      Seems you're right. The installer must have been showing me relative paths. *whew* At least now I can clean up that junk. :-)

    6. Re:Good points by ViolentGreen · · Score: 1

      Yeah, that's one of it's advantages. I looked at dports but fink seems a little more robust.

      --
      Not everything is analogous to cars. Car analogies rarely work.
    7. Re:Good points by killjoe · · Score: 1

      hostname name_of_your_host

      if you want to know what the name is set to currently then just hostname with no parameters.

      If you are running OSX server then you use the

      serversetup --setCOmputerName computername

      Don't ever muck with the files directly unless you know what you are doing. If you mess with the /etc/hostname the system will revert it back to what it was when you reboot. A lot of those files get regenerated everytime you touch the gui too.

      In the Mac there is a command line for everything. Just download the PDF and search it.

      --
      evil is as evil does
    8. Re:Good points by AKAImBatman · · Score: 1

      The darwin packages install into /opt, so I guess they're even on that exact point. :-)

    9. Re:Good points by Anonymous Coward · · Score: 0

      That is true, however Fink does do one thing by default that I find deplorable: it puts /sw/bin at the FRONT of your path instead of at the end, thus replacing (not physically, but effectively) basic system binaries like cp, rm, ls, df. No third-party library should put EVER itself in front of /bin unless the user specifically asks for it.

    10. Re:Good points by diamondsw · · Score: 1

      Odd, the whole point of fink is it DOESN'T make a mess. Unless you go to great lengths to override it, everything it does is installed in /sw. Delete that one directory and everything is gone. Contrast this with other package management systems (GentooPPC et al) that follow the standard UNIX "throw it all in a dozen different directories" model.

      Fink makes dealing with source and binary installs a piece of cake. I only wish Gentoo could handle binary installs this seamlessly (you know, I DON'T want to compile KDE from scratch) and neatly.

      --
      I don't know what kind of crack I was on, but I suspect it was decaf.
    11. Re:Good points by Smurf · · Score: 2, Insightful
      That is true, however Fink does do one thing by default that I find deplorable: it puts /sw/bin at the FRONT of your path instead of at the end, thus replacing (not physically, but effectively) basic system binaries like cp, rm, ls, df. No third-party library should put EVER itself in front of /bin unless the user specifically asks for it.

      Wait a minute: first, Fink doesn't have replacement packages for cp, rm , ls, nor df. None of them get replaced even "effectively".

      Now, suppose that they post an improved version of, say, ls. If you choose to install their version, then of course you want it to "effectively" replace the system's version. I mean, you should know what you are installing and why (unless you are rather clueless, in which case you probably don't want to mess with Fink/OpenDarwin/etc).

      Allegedly, it would be better if they appended /sw/bin at the end of the path and added some mechanism to allow you to have a subset of binaries before the system ones, so that they can be replaced. And allow the user to decide in which group to put each package. As you can see, this can easily turn into a mess, so I'm glad they implemented it as they did.

  13. Umm, yeah by MichaelPenne · · Score: 1

    Think: do you know how to count the words in a Word file?

    Leingang doesn't?

    I mean I'm all for MacOSX and I often use the command line, but I also think clicking "Tools" and selecting "Word Count" from the drop down is more fun than typing a string of commands into a CLI.

    1. Re:Umm, yeah by 3)+profit!!! · · Score: 1

      Download WordService here, And you can count the words in whatever text you're selecting (in any application), just by pressing shift-command-I, or selecting "Statistics..." from the services menu. Pretty handy.

  14. You're being disingenuous by Dink+Paisy · · Score: 5, Insightful
    In Microsoft Word, I go to the "Tools" menu and choose "Word Count..."

    For my current document, it reads:

    Statistics:
    Pages 23
    Words 10,234
    Characters (no spaces) 52,996
    Characters (with spaces) 63,140
    Paragraphs 107
    Lines 660

    One of the really nice things about GUI's is that they make rarely used commands (like word count) really easy to discover. You just look in the menu, and there it is. Compare that to a UNIX command prompt, where if you don't know how to write scripts and you don't know that the "wc" command is for word counts, you are lost.

    --

    Whoever corrects a mocker invites insult;
    whoever rebukes a wicked man incurs abuse.
    --Proverbs 9:7
    1. Re:You're being disingenuous by Anonymous Coward · · Score: 0

      Well, I won't disagree with you outright. However, it might be easier than you think under unix.

      % apropos count words | grep "(1)"

      gives me 10 results including "wc" - it's pretty easy to figure out "wc" is right from the command summaries it gives you.

      Having to grep against "(1)" is annoying, but it just means to only show results for executables as opposed to libraries, &c.

    2. Re:You're being disingenuous by Sigh+Phi · · Score: 1

      parent:

      One of the really nice things about GUI's is that they make rarely used commands (like word count) really easy to discover.

      And one of the drawbacks of the GUIs (so far at least) is that it is difficult to use features (like Word Count) in any way but the limited set the software engineers imagined. For instance, what if you want to count the number of words in a text entry field on a web page?

      The small, single-purpose utility model is like having a box of Legos that you can use to construct anything you want, on the fly. The drawback is that you have to build everything yourself. The monolithic app model, like a Transformer, has some limited flexibility, and can do some things you probably wouldn't dare on a command line. It works for most people and commonly-used (and occasionally complex) tasks, but has a finite number of states. Both approaches have their strengths and weaknesses.

      One of the reasons I immediately liked Mac OS X was because Terminal.app understood drag-and-drop, and behaved in every way I expected a GUI app to behave (unlike cmd.exe, to single out a particularly weak terminal emulator). By the same token, many OS X GUI apps have understood the power of a CLI; you can pipe a file into BBEdit, for instance. BBEdit can use shell scripts (and any arbitrary scripting language) on text within its GUI windows, and in turn redirect its output back to the CLI (or another program via AppleEvents).

    3. Re:You're being disingenuous by Rezonant · · Score: 0

      "For instance, what if you want to count the number of words in a text entry field on a web page?" Copy-paste into Word. Do word count. Trivial.

  15. the hard way by byrd77 · · Score: 4, Funny

    grep -v -c "Something I know is not in the file" file.txt

    --
    - Carpe diem, quam minimum credula postero.
    1. Re:the hard way by Araneidae · · Score: 1

      A more reliable way of doing the same thing is
      grep -c '^' file.txt

  16. Re:OSX by Anonymous Coward · · Score: 1, Funny

    The only "roots" BSD has are the tree roots growing thru its coffin. *BSD is dying. You don't need to be a Kreskin to know that.

  17. Re:OSX by Anonymous Coward · · Score: 0

    "A" based on "B" based on "C" does not mean "A"=="B"

  18. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  19. Get Mod 0 for MS Answer - Higher if OO or Combo by spockman · · Score: 2, Interesting

    I see how this works now. If you only answered with the MS way you get modded 0 but if you used the OO answer or a combination of MS and OO you get modded higher.

    1. Re:Get Mod 0 for MS Answer - Higher if OO or Combo by FerretFrottage · · Score: 1

      36 words (counted using MyIs)

      --
      "Look Lois, the two symbols of the Republican Party: an elephant, and a fat white guy who is threatened by change."
    2. Re:Get Mod 0 for MS Answer - Higher if OO or Combo by Anonymous Coward · · Score: 0

      Do you know what OO stands for?
      Is it applicable here?

  20. Word: wc with too many "features" by Flexagon · · Score: 4, Funny

    There's no GUI analogue, perhaps because anybody tempted to make one would add too many "features" that cluttered its ease of use. Think: do you know how to count the words in a Word file?

    Tools -> Word Count

    Yes, Word could be considered to be wc with too many other "features"!

    1. Re:Word: wc with too many "features" by Anonymous Coward · · Score: 0

      Actually, word would be VI w/ too many features...

      Word Count is just a wc plugin to VI. :-)

  21. Related titles by lpangelrob2 · · Score: 2, Interesting
    Earlier this year I picked up Mac OS X Panther for UNIX Geeks, since I decided I probably should know a bit more about UNIX. (Plus the foreword said, hey, even if you just update a website that has UNIX on its webserver, the book is for you.) Needless to say, that particular book hurt my head, and I think I probably should have picked up Learning Unix for Mac OS X Panther instead. Whoops.

    As I am considering the advanced Unix users that browse this forum, I'd suggest having a look at that book too/instead.

  22. Typical OS bigotry by Anonymous Coward · · Score: 2, Insightful

    Do I know how to count characters in a word document? Certainly. And, best of all, it will actually count characters, in any character set, not just in ASCII or other similar 7/8 bit sets.

    But that's not really the point. Knowing how to do something in one OS does not make the one you are ignorant about an inferior OS. If you truly do know both OSes, then I'll listen to your opinions. Until then, I'd stay away from making comparisons.

    It is the height of arrogance to assume that if you don't know something that it must not exist.

  23. More retarded assery from the zealot front by stratjakt · · Score: 4, Interesting

    A robust programmable command line is a great tool, but for completely different reasons than listed.

    It's powerful because you can create intelligent scripts to automate tasks. Then you launch those scripts by clicking them.

    You aren't going to win anyone over by typing in some esoteric "find ~ blah | fart pipe * & (! exemo!'" command, when you could have just opened the search box and typed "foo". You're just going to look like an elitest dick.

    Once upon a time, I knew all those stupid commands and switches and would pipe output through 98 different little apps to find something out.

    Now I'm happy as a clam to spend my time and energy doing other things with my computer.

    This summary, at least, is all about "using a command line to make simple tasks harder so that you can feel like a real 1337 h4z0r everytime you do something so mundane as count the words in a file"

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:More retarded assery from the zealot front by Anonymous Coward · · Score: 0

      You sir need to be modded up!

    2. Re:More retarded assery from the zealot front by Anonymous Coward · · Score: 0

      That's great if all you do are simple things like searching, browsing and opening files. If you want to do something like parse through a directory recursively and change all spaces in filenames into underscores (or vice-versa), I don't think there is a button for that in Finder. I could search for a poorly written third party app to do it for me with a GUI, or I could bang out a little script using "all those stupid little commands" cobbled together.

      I did this for a friend. Instead of calling me an elitist dick, they thanked me for saving them from manually editing a bunch of filenames. You don't have to be a '1337 h4x0r' to have genuine needs that lie outside of what the GUI will allow you to do.

    3. Re:More retarded assery from the zealot front by Stinking+Pig · · Score: 1

      But, I am an elistist dick you insensitive clod!

      --
      "Nothing was broken, and it's been fixed." -- Jon Carroll
  24. wc: by DogDude · · Score: 1

    Textpad: View, Properties

    I still contend that Textpad is the best text editor that I've ever seen.

    --
    I don't respond to AC's.
    1. Re:wc: by Anonymous Coward · · Score: 0

      Agreed. Its a must for any windows coder :)

  25. The EASY way! by Anonymous Coward · · Score: 1

    ls file.txt, note filesize and divide by 4.

    That is if, like me, your writing mainly consists of four letter words.

    1. Re:The EASY way! by Anonymous Coward · · Score: 0

      Shut your trap fuck head!

    2. Re:The EASY way! by Anonymous Coward · · Score: 0

      You DO mean divide by 5, right?

  26. Let the GUI v CLI battle commence by RealProgrammer · · Score: 1

    I'm a CLI guy. I use a browser, but I feel bad about it :-).

    I've been looking for a simple X application that was a pipe interrupter, sort of a GUI 'cat', call it 'xcat'. The idea is to type a command like:
    xcat foo.c | wc -l
    and xcat would fill its buffer with foo.c, pop up to let you modify the buffer, and send the results to 'wc -l'.

    There are a lot of times when I want to gather text from a variety of places (including GUI places) and run it through a command line filter. An 'xcat' would help unify my world a bit.

    I end up typing (to continue the example)
    vi foo.c
    (inside vi:)
    !Gwc -l
    to pipe the contents of vi's buffer through 'wc -l'. It's not optimal.

    Looking for 'xcat' made me feel guilty for not knowing how to program for X Windows. Researching how to program for X Windows made me like the command line! There doesn't seem to be a simple, cross-platform, it'll work everywhere, X toolkit.

    Now I just hate the world, and will retreat into my own bitterness.

    --
    sigs, as if you care.
    1. Re:Let the GUI v CLI battle commence by Anonymous Coward · · Score: 0

      man sed

    2. Re:Let the GUI v CLI battle commence by RealProgrammer · · Score: 1

      >man sed

      I know sed, or at least I think I do. It's the kind of filter I use a lot. Is there some feature or implementation of sed that lets you cut and paste from a GUI context?

      --
      sigs, as if you care.
    3. Re:Let the GUI v CLI battle commence by argent · · Score: 1
      The easiest way to program for the GUI from the command line is using Tcl.
      #!/bin/sh
      #\
      exec wish "$0" ${1+"$@"}

      pack [
      button .x -text "Finished" -command {
      puts [.t get 0.0 end]
      destroy .
      }
      ] -side bottom -anchor w
      pack [
      scrollbar .y -command ".t yview" -orient v
      ] -side right -fill y
      pack [
      text .t -yscroll ".y set" -setgrid 1 -width 60
      ] -side left -fill both -expand 1
      set fp stdin
      if [llength $argv] {
      set file [lindex $argv 0]
      if [catch {set fp [open [lindex $argv 0] r]} err] {
      puts stderr $err
      exit 2
      }
      wm title . $file
      }
      while {[gets $fp line] >= 0} {
      .t insert end "$line\n"
      }
    4. Re:Let the GUI v CLI battle commence by Anonymous Coward · · Score: 0
      I'm not sure what you want, but wouldn't ``!Gwc -l'' replace the buffer with the output of wc? Wouldn't you prefer to do a
      :w
      :!wc -l %
      ?

      For piping between GUIs and the command line, the Mac has pbcopy and pbpaste. pbpaste will cat any text you've copied from a GUI app with command-c or command-x, and if you pipe text to pbcopy you can paste it in a GUI with command-v. Is that what you're looking for?
    5. Re:Let the GUI v CLI battle commence by Jimmy_B · · Score: 1

      #!/bin/sh
      cat >tmp$$ # Process stdin
      cat $* >>tmp$$ # Process files
      chmod 600 tmp$$ # Don't let others modify the temp file while you're working on it
      gvim tmp$$ # Or use some other X editor.
      cat tmp$$ # Send the result to stdout
      rm -f tmp$$ # Remove the temp file

    6. Re:Let the GUI v CLI battle commence by Anonymous Coward · · Score: 0

      On a Mac there is something that lets you cut and paste from a GUI context. These commands are pbcopy and pbpaste. Please see this man page. Also, I've discussed these commands in a previous reply.

  27. I am wiser now. by kahei · · Score: 2, Informative

    The fact that Neal Stephenson, the commentator, and the person who accepted the article were able to write and read so much about the subject without ever noticing all the obvious and commonly used GUI counterparts to wc -- many of which are considerably more interesting, for instance Word does a little morphological analysis to count Japanese words -- says something desperately sad about those people and perhaps about the culture they are from.

    But the fact that so many slashdotters stepped up already and cared enough about nitpicking the record straight that they have posted the path to the word count tool in Word at least half a dozen times already, fills me with hope!

    I feel as if I have gained wisdom from this simultaneous despair and revival. The feeling is probably false, though.

    Incidentally, the finest and most satisfying way to count words (if wc's answer is good enough) is to use wc... from vim.

    --
    Whence? Hence. Whither? Thither.
    1. Re:I am wiser now. by argent · · Score: 1

      the obvious and commonly used GUI counterparts to wc -- many of which are considerably more interesting

      Can you use them to count the words added to a file every five minutes, to count the words ONLY on the lines beginning with "IMPORTANT", to count the number of words past the 40th character on long lines, to count the number of words in the ID3 titles in your iTunes Music folder, ...

      the finest and most satisfying way to count words (if wc's answer is good enough) is to use wc... from vim.

      Heretic. Luckily the nvi from Jaguar runs on Panther.

  28. how many ways to do wc in a gui (word) by yagu · · Score: 5, Insightful

    Already I'm seeing in the posts exactly what and why CLI users throw up their hands trying to deal with GUI.... and "wc" is a pretty good example. When the OP asked Think: do you know how to count the words in a Word file?, I knew without even reading on in the posts I was going to encounter (and, I did):

    • at least two versions/ways to do wc in a word doc within the first 10 posts, and....
    • a real attitude from the anointed who had the "answer".

    For those who didn't bother to sign up for the clue, the question was mostly rhetorical, and was an example of the diff between CLI and GUI. I know my immediate response wasn't, "I know EXACTLY how to do that in word," but rather, "Hmmmmm, I know I've solved that and found that "option" SOMEWHERE in word before, but I don't remember exactly where..."

    OTOH, were you to ask CLI users the same question.... they would all know exactly how to use wc, and interestingly enough, had you asked the same question to the CLI users over the past fifteen years you would have gotten the same answers. So, in addition to a simple answer, CLI is a consistent one.

    P.S.And don't even get me started about the menus with chevrons! Assuming for the sake of argument we are talking about the current version of WORD, have YOU ever tried to walk someone through this kind of stuff over the phone? With MS' genius implementation of self-modifying menus, you could "claim" something is in a menu when trying to help someone when in fact because of their use menus, their menu is completely different from yours.

    1. Re:how many ways to do wc in a gui (word) by Chess_the_cat · · Score: 2, Informative
      And don't even get me started about the menus with chevrons! Assuming for the sake of argument we are talking about the current version of WORD, have YOU ever tried to walk someone through this kind of stuff over the phone? With MS' genius implementation of self-modifying menus, you could "claim" something is in a menu when trying to help someone when in fact because of their use menus, their menu is completely different from yours.

      Without knowing where it was beforehand it took me about 5 seconds to find the following:

      Right click on any Toolbar, Customize, Options, and check "Always show full menus."

      --
      Support the First Amendment. Read at -1
    2. Re:how many ways to do wc in a gui (word) by Anonymous Coward · · Score: 0

      Read Jef Raskin's book, "The Humane Interface", about user interface design. He uses many Windows examples to demonstrate bad design decisions. Nested menus and menus that change are two classic examples of designs to avoid.

    3. Re:how many ways to do wc in a gui (word) by Anonymous Coward · · Score: 0
      Without knowing where it was beforehand it took me about 5 seconds to find the following: Right click on any Toolbar, Customize, Options, and check "Always show full menus."

      It's taken me longer than that it. And I know I'm not alone - whenever someone asks for help with Office, the first thing I do is turn off that damn option. They always thank me.

    4. Re:how many ways to do wc in a gui (word) by nine-times · · Score: 1
      OTOH, were you to ask CLI users the same question.... they would all know exactly how to use wc, and interestingly enough, had you asked the same question to the CLI users over the past fifteen years you would have gotten the same answers. So, in addition to a simple answer, CLI is a consistent one.

      OTOH, the CLI answer *could* just as easily be anything, and it can be pretty hard to find if you don't know. I could make an wordcount tool be called "wrdcnt" or "wordcount". Given only the executable name 'wc', I have to go reading through manuals to find out what '/s' might do, if anything. So, it's fast as long as you're operating on a system that uses all the same commands, and you're using commands/switches you're familiar with.

      Compare that with using a GUI, and I might say, I don't remember exactly where 'word count' is, but quickly scrolling through the menus will find it in any decent word processor. Usually, if there are any options to be found, it'll be apparent-- I won't need to RTFM.

      P.S.And don't even get me started about the menus with chevrons!

      You're absolutely right about the stupidity of self-modifying menus. A power user will know how to modify the menus himself, and self-modifying menus placed in front of a newbie will only serve toward confusion. However, let's not confuse a criticism of Microsoft's implimentation of their GUI with a criticism of GUIs themselves.

      I think the simple truth is, there are some activities that can be accomplished quicker and more easily on a GUI, and some tasks that are quicker and more easily accomplished with a CLI. If you have both (which, I can't think of an actively developed OS that can't), then you get to pick and choose which works for you for each task, so why complain?

    5. Re:how many ways to do wc in a gui (word) by yagu · · Score: 1

      Yes, you found it.... I've found it, many times! But why would we even have to go through this hoop in the first place? The crowning achievements I'm seeing in posters is, "I found it!", which misses the point. In WORD, and most other MS products, learning how, when, where, and why typically isn't sufficient to "know" the interface -- they're always changing it -- and we're always having to re-learn it. I can do that, I can deal with it, but why should I have to?

      Learn it once, that should be all you have to know.

      And, again to my point about the chevron menus -- it wasn't that the problem is/was insoluble, just that it even exists in the first place. Plus, it really does become a pain trying to help people, especially over the phone.

    6. Re:how many ways to do wc in a gui (word) by Jeff+DeMaagd · · Score: 1

      Uh, the CLI people try to act annointed too.

      CLIs assume perfect typing skills, any time correcting errors is time wasted. then there's the not remembering the rarely used flags.

      I really don't see such a strong benefit to CLI to switch exclusively to it, I think the power users that advocate GUI to the exclusion of CLI, or CLI to the exclusion of GUI need to learn that a) their choice is not for everyone and b) their choice isn't necessarily the best choice to make in every situation.

      Of course, CLI is IMO useless outside of the power user realm, I think it would be arrogant to expect a casual user to touch CLI and be proficient in it, any more than I expect a Linux geek to know how to tune up their own automobile, much less overhaul the engine.

      To me, time spent in the Word help files to find an option probably equals the time spent fiddling with the pipes and reading the man pages to make sure I am using the right options.

      IMO, plain text files have limited usefulness outside of configuration, and IIRC, wc assumes plain text. I wouldn't type a document as a text file as it doesn't have any formatting or typesetting features, something relegated to a more sophisticated format.

    7. Re:how many ways to do wc in a gui (word) by yagu · · Score: 1
      OTOH, the CLI answer *could* just as easily be anything, and it can be pretty hard to find if you don't know....

      Actually, in the context of the discussion it couldn't be anything, it was being discussed as "wc", and that is mainly the point. It was "wc" (we're basically talking unix/posix 1003.2 here) in the early seventies, and it's "wc" today. And it does essentially the same thing today as then.

      Compare that with using a GUI, and I might say, I don't remember exactly where 'word count' is, but quickly scrolling through the menus will find it in any decent word processor. Usually, if there are any options to be found, it'll be apparent-- I won't need to RTFM.

      Maybe it's just two different ways of approaching the interface.... Scrolling through menus doesn't work well for me.... Yes, I remember the option or tool was "stats", or "word count", or "properties".... and I begin my treasure hunt. Unfortunately, most GUI apps seem to have everything AND the kitchen sink, so that search can take a long time. OTOH, for me, I find it much easier to type "wc fname"..... Done! Don't have to look for it.... don't have to RTFM.... Again the context here is we know what we're going to use, so there isn't a requirement to learn it.

      I see we agree on the menus..., and I don't think we're that far separated on philosophy.

    8. Re:how many ways to do wc in a gui (word) by kollivier · · Score: 1
      For those who didn't bother to sign up for the clue, the question was mostly rhetorical, and was an example of the diff between CLI and GUI.

      How do you know it was rhetorical? He even says "Think", challenging the reader as to if they know an answer. (Suggesting that he thought they couldn't quickly come up with one.) A rather silly challenge if 1000s of people can give the answer in one breath. (Which *many* authors, 'knowledge workers', students, and others could.) If I said "Think: How can you find files from the commnad line?", how would *you* have responded? Would you have defended my "rhetorical" question, or laughed me off as someone who doesn't know the basics of CLI?

      In any case, you seem bothered by the fact that several people are quite happy with the GUI solution, or even have pointed out deficiencies in wc. To me, it's not about what's better, CLI or GUI - it's silly to argue about it. The right tool for the right job for that particular user is the "correct" answer, be it CLI or GUI. If it works, and the user likes it, what's the problem? That they could be 12% more efficient? What if they don't care? What if they use the command once every 3 months and spending 1 minute finding it is acceptable? Maybe if open source developers could get over some of their detest for GUIs, they could build better GUIs and get more people using their tools.

      On second though, nah, that's a silly idea... ;-) On with the reasons why CLIs do everything better and GUIs are so annoying!

    9. Re:how many ways to do wc in a gui (word) by nine-times · · Score: 1
      Actually, in the context of the discussion it couldn't be anything, it was being discussed as "wc", and that is mainly the point. It was "wc" (we're basically talking unix/posix 1003.2 here) in the early seventies, and it's "wc" today. And it does essentially the same thing today as then.

      Sure, if the whole point of your argument is that 'wc' is a command that happens to have remain unchanged for a long time, however...

      I don't think that's any kind of an argument for inherent superiority of CLI, but more an argument for "Thank GOD they don't change these things!" But, you see, that they don't change these things is to make up for a weakness in the CLI that isn't such a problem for the GUI: It's pretty hard/time-consuming to find out how to do something, unless you already know. If I sit down at a hypothetical CLI system, not knowing knowing a single command, or even what system it is, I'm done for. Even if it uses a similar prompt/syntax system, there's nothing I can do unless I can find a manual, and even then, it will take quite a bit of reading to get started. Even if you know a command, but can't remember exactly how it's spelled, you're in for some pain. Ever see a dos guy getting frustrated at a unix system because "dir" doesn't work? On the other hand, the GUI (a good GUI) pretty much explains itself. It plays on our visual/spacial intuition to represent things that we can act on.

      I find it much easier to type "wc fname"..... Done! Don't have to look for it.... don't have to RTFM....

      Sure, but that was part of my point. If you already know the system you're working on, and you've memorized the commands, it's just that easy. Likewise, if I'm familiar with the GUI I'm working on, and I know where everything is, there's no 'treasure hunt'. A UI that you're familiar with, know the ins-and-outs of, and are comfortable on is going to be easier to deal with one that you aren't, and don't. But that doesn't tell you which one is "better".

      OTOH, I could be relatively competant on Unix systems, know that there's a command for executing a word-count, but just not know the command is 'wc', and it could be a pain in the butt to figure it out. Finding an unfamiliar/infrequently-used option or command in a GUI tends to be a bit easier.

    10. Re:how many ways to do wc in a gui (word) by jesterzog · · Score: 1

      OTOH, were you to ask CLI users the same question.... they would all know exactly how to use wc, and interestingly enough, had you asked the same question to the CLI users over the past fifteen years you would have gotten the same answers. So, in addition to a simple answer, CLI is a consistent one.

      I routinely use both graphical and command line interfaces, and they both have their good and bad points. It's really just the difference between beginner and expert interfaces, and each has its benefits and problems. I certainly prefer a beginner's interface in some circumstances --- usually when I don't have the time or interest to learn the more advanced way of doing things. (Hey, you still have to learn the commands.) Although 'wc' is certainly one of the simpler ones, there are a lot out there that many people will only need very infrequently, and spend a lot of time and effort searching for what they want when they do.

      I think that one of the major benefits of the UNIX command line, which you sort of hinted at but didn't really stress, isn't just that it's (relatively) consistent over time, but that it's consistent between uses. When you actually do learn how to use 'wc', you're not just learning how to count words, lines or characters in a document. You're learning how to count words, lines or characters in nearly any stream that can be translated to a standard text format. .. and text streams are very common in UNIX environments because they're so useful for so many commands that can be used.

      It's usually not all that difficult to learn to count words in a word document, or words in an openoffice document, or words in an excel spreadsheet (I think), or words in a web page, or files in a folder, or exceptions thrown by a particular program, and so on. The problem with GUI's due to their nature is that each of these tends to have a different way of doing a very similar thing.

      With a good command line interface that keeps the functions separate from the media, you still need to learn the basics of how to deal with whatever media is being used. But once it can be translated to an appropriate form of text the words can be counted, or the output can be filtered, or saved to a file, or the lines produced can be executed as commands, or the output can be mailed to an administrator or a thousand people on a mailing list, and so on.

    11. Re:how many ways to do wc in a gui (word) by Maserati · · Score: 2, Interesting

      This may be Microsoft's biggest HCI flaw ever. The second one is whatever caused our lead Filemaker developer to accidentally and irretrievably delete an entire project in Access 97 a mere two hours into a product evaluation.. But number one is a threefer: making interface elements moving targets, hiding a large portion of the menu items from view, and adding an extra click to access the hidden items.

      The unspoken prime directive of interface design is No Moving Targets. It makes the UI harder to learn, slower to use and more frustrating. This implementation of menus does a grave disservice to novice suers (sorry, too many SCO articles). The best way to learn what a program does is to explore the menus. Making that an unecessarily time consuming and frustrating task discourages novices from learning [1]. People learn an interface both visually and kinetically. Kinesthetic memory plays a big role in how we learn software [2], moving targets retards this process. And by making everyone's menus different you create a support nightmare.

      The main role of a menu is to group common functions spatially without taking up much of the screen (this is one reason why Apple has stuck with a single menu bar for 20 years). The introduction of hierarchical menus was a controversial move in interface design, since it hid some of the commands. The Views menu in a word processor is a good example. They're a necessary evil since menus can't be too long either. But when Windows hides the rarely used functions they remove those functions from the user's ken altogether, defeating the purpose of menus.

      The rarely used fucntions can be the most important. Adding an extra click to get at the more powerful functions hinders the intermediate users. There is always the option to customize the menus or keyboard shortcuts, but requiring the suer to do that to easily perform any but the most basic functions is a sign of poor design.

      Their concept was probably a Marketing idea: make the menus learn how the user works and adapt themselves accordingly. It looks great on a presentation but you wouldn't want to use it.

      [1] Yes, you can point to this and say that Windows causes stupid users.

      [2] cf. both Tognazzini and Nielsen

      --
      Veteran, Bermuda Triangle Expeditionary Force, 1992-1951
  29. adding to my previous response by Dink+Paisy · · Score: 3, Insightful
    The author of the review (and apparently the author of the book as well) are proponents of the view that each tool should be as simple as possible and do one job well. That just doesn't make sense any more. Now we have large, monolithic command line tools that can do many jobs well.

    Having one large, all-purpose tool is better because instead of having to learn many simple tools with different syntax and stringing them all together in a massive chain of fork()'s and file handles, we can use a single tool that is more sophisticated, more consistent, and more resource efficient for big tasks. As Rob Pike said in his interview here so recently, the days of one tool doing one job well "are dead and gone and the eulogy was delivered by Perl."

    --

    Whoever corrects a mocker invites insult;
    whoever rebukes a wicked man incurs abuse.
    --Proverbs 9:7
    1. Re:adding to my previous response by NoOneInParticular · · Score: 1

      Please note that in that quote the eulogy was delivered by a programming language, not a GUI.

  30. Useful, acutally. by smcdow · · Score: 0, Troll

    I played with an OS X machine the other day. I found a terminal program which gave me a CLI. At that point, it became useful.

    --
    In the course of every project, it will become necessary to shoot the scientists and begin production.
    1. Re:Useful, acutally. by NardofDoom · · Score: 1

      To get even more use out of an OS X machine, hold down Command-S on startup.

      --
      You have two hands and one brain, so always code twice as much as you think!
  31. XP home by Anonymous Coward · · Score: 0

    If you are gonna do complex stuff, get that command line out. Most of the features that MS says were removed are right there waiting for you to use them.

  32. Speed of command lin by SeanDuggan · · Score: 2, Insightful
    Actually, given how slow Windows Explorer tends to be parsing directories, yes it may be much faster. I still remember a friend of mine deleting a large directory of temporary items. After 10 minutes of waiting for windows to finish displaying the whole directory, he dropped down to MS-DOS and deleted them all with one command and about 5 seconds of runtime.

    There are definitely speed advantages to command lines.

    --
    This sig has absolutely no significance and serves only to take up screen space and waste the time of the reader.
    1. Re:Speed of command lin by Maserati · · Score: 1

      Yeah, it happens. Mainstream file managers don't cope with massive directories. As a purely empirical conclusion, I"ll state that all versions of Windows suffer from problems just from having large temp directories, not just from trying to browse them. It's *any* access, which puts it deep in the system.

      To be fair, I'll bash Apple for a sec. Back a few years I got a call from a user who had dropped over 10,000 images into one directory on a firewire drive. The Mac OS 9 Finder just died trying to read that directory. I hooked the drive up to one of the DP3 machines we had. And split the files up into subdirectories in seconds.

      To be fair to Apple, closed folders with any number of files in them (that you could get into them) weren't a problem. And while not everyone agrees with some of the design decisions, most people would agree (yeah, yeah I know) that the Finder has always had higher-quality design work than any version of explorer.exe ever has. Face it, it has its bright spots but the Windows file manager has a lot of rough spots. Have no apparent attention paid to aesthetics is just the first to leap to mind.

      --
      Veteran, Bermuda Triangle Expeditionary Force, 1992-1951
    2. Re:Speed of command lin by reso · · Score: 1

      what was the title of this post ;)

      --


    3. Re:Speed of command lin by Maserati · · Score: 1

      Never seen someone agree with a post before ?

      --
      Veteran, Bermuda Triangle Expeditionary Force, 1992-1951
  33. *looks surprised" by jawtheshark · · Score: 1
    My mother tongue is dutch... Modern dutch of course. I never heard that "Unochs" means "tree-based" in Old Dutch. A tree in dutch (modern that is) is called "boom" (ponunication "b-ohm").

    Of course my Old Dutch doesn't go further than "Hebban olla vogalan nestas higonan". ;-)

    --
    Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    1. Re:*looks surprised" by 2.7182 · · Score: 1

      That is because it is from a special dialect, whaling Dutch.

    2. Re:*looks surprised" by Incadenza · · Score: 1

      Of course my Old Dutch doesn't go further than "Hebban olla vogalan nestas higonan"

      Which according to recent research, may well be not Dutch at all. It was probably written by a Flamand monk in England. Only one word in the whole sentence is positively Dutch, all the others are too close to English equivalents to be true.

    3. Re:*looks surprised" by jawtheshark · · Score: 1
      Heheh, I was just citing what I learned in highschool.... that was about 10 years ago. I have as much contact with literary history as most slashdotters have contact with girls ;-)

      Any links? Since the monk is Flemish, why wouldn't he write Dutch? After all, Flemish is Dutch. (Yes, I am Flemish... but not a monk)

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
  34. No wonder I couldn't print by tepeka · · Score: 1

    I thought 'at_cho_prn' was the command line way of selecting where to download pr0n...

  35. Word 2004 ALWAYS shows word count by benwaggoner · · Score: 3, Informative

    Guys,

    The default install of Word 2004 for Mac always shows the word count, in the lower right hand corner. It shows it as XXX/YYY, where XXX is how many words are before the cursor, and YYY is for the entire document.

    As a professional writer, I can't imagine what wc would offer me that would be better than that! I often work on very specific total word targets for articles, so I can track if I'm under or (much more likely) over, and tweak accordingly.

    Personally, I haven't been able to use Word on Windows since they started putting the icons in the wrong place in the menus. The PowerBook 17" is the ideal writing machine today, in my opinion.

  36. Or, you can set a menu key by oneiros27 · · Score: 1
    A little time up front now, and you can save more time in the future:
    BBEdit -> Set Menu Keys...
    Then look for:
    Window -> Get Info
    --
    Build it, and they will come^Hplain.
  37. Hear Hear by Altus · · Score: 1


    id mod you up if I could.

    people are quick to laud the CLI and bash the GUI but there are advatages to both... and the discussion is not complete without looking at all of this. I have used the command line plenty, in both Mac OS X and in other flavors of UNIX. I have never used "wc" and wouldnt have even thought to type "wc" to get a word count on a document. Word count isnt something that I have had the need for, but if I did, it would be a lot easier to discover how to do it in word (or BBEdit, which is really easy) that to try and guess what command would do it from the CLI.

    --

    "In America, first you get the sugar, then you get the power, then you get the women..." -H. Simpson

  38. Rant time by edremy · · Score: 4, Insightful
    Word count. What a moronic example. Let's imagine I'm a typical Word user vs. a typical Unix user

    Word: I don't know how to word count. I can either trawl the menus (Hmm, "Tools" looks possible- gee, option 4 is Word Count- maybe that works) or click Help and type word count and get the #1 option: How to count words. Farking trivial for poo-flinging chimp, perhaps less so for a typical user but having worked help desk, I've never gotten a call about this. I get a nice list of pages, words, characters, paragraphs, etc.

    Unix. Well, gurus know wc. If not, how do I find out about it? Perhaps I actually know the "man -k" command. Let's try "man -k word count"- hmm, ~8 pages scroll by. I'm a really smart unix user: "man -k word count |more". Let's look at the entries

    #1- BN_add_word (3ssl) - arithmetic functions on BIGNUMS with integers. Hmm- fuck no. (Omitting much BN badness)

    #8- EVP_BytesToKey (3ssl) - password based encryption routine. What the hell? I just want to count words, damnit.

    4 screens later, I actually find wc- maybe that will work.
    "wc myfile.txt". (And it had better be ASCII text- don't try feeding wc a file in Japanese. Or an HTML file for that matter: Word correctly counts the actual text without the tags, wc won't) "1624 2282 53168 myfile.txt" Ok, which number do I care about? "man wc" Hmm- probably the second. But hey- it's scriptable. That means it's better, right?

    Witness the amazing power of the command line: I can dick around for five minutes trying to figure out what command to use and end up with one vastly inferior for almost all tasks compared to the GUI version.

    I love command lines, I really do. (I have to- I admin a couple of Unix boxes) But people vastly underestimate how powerful GUI tools have gotten and how long it takes to learn the arcane syntax of a typical Unix shell.

    --
    "Seven Deadly Sins? I thought it was a to-do list!"
    1. Re:Rant time by Athas · · Score: 0
      Of course, you could just type "apropos count words," which will promptly display:
      wc (1) - print the number of newlines, words, and bytes in files
      Fascinating, isn't it?
    2. Re:Rant time by edremy · · Score: 1
      On your system it displays that. Let's use that wonderful wc program on mine...

      "apropos count words |wc -l"
      73

      wc is the 2nd to last on that list of 73, so it actually does show up on the screen if you omit the wc. Awesome! Really user friendly, that.

      --
      "Seven Deadly Sins? I thought it was a to-do list!"
    3. Re:Rant time by OmniVector · · Score: 1

      i think few will debate that accessability when comparing the gui and the console, it's obvious the gui wins there. the utility from the console comes only after it's mastered. a proficient console user can do many gui things in less time, or often in more direct ways and can chain other useful commands in the console via piping to even greater enhance the utility. i know i've never found a simple way to do something like find all the files in a directory with the file extension .java and tell me the total line count of all those files in a gui. in the console it's dead simple.

      --
      - tristan
    4. Re:Rant time by Anonymous Coward · · Score: 0

      Your post had 1500 characters, 340 spaces, 1840 total. 333 Words and 16 lines.

      Now that's a bit much right? So let's boil it down to 50% size:
      Word: I don't know how to word count. I can either trawl the menus (Hmm, "Tools" looks possible- gee, option 4 is Word Count- maybe that works) or click Help and type word count and get the #1 option: How to count words. Farking trivial for poo-flinging chimp, perhaps less so for a typical user but having worked help desk, I've never gotten a call about this. ...Perhaps I actually know the "man -k" command. Let's try "man -k word count"- hmm, ~8 pages scroll by. I'm a really smart unix user: "man -k word count |more".

      #1- BN_add_word (3ssl) - arithmetic functions on BIGNUMS with integers. ...(And it had better be ASCII text- don't try feeding wc a file in Japanese. Or an HTML file for that matter: Word correctly counts the actual text without the tags, wc won't) "1624 2282 53168 myfile.txt" Ok, which number do I care about? "man wc" Hmm- probably the second. ...Witness the amazing power of the command line: I can dick around for five minutes trying to figure out what command to use and end up with one vastly inferior for almost all tasks compared to the GUI version. ...(I have to- I admin a couple of Unix boxes) But people vastly underestimate how powerful GUI tools have gotten and how long it takes to learn the arcane syntax of a typical Unix shell.
      --

      There we go. All thanks to services in OS X which let me have the power to do this and a lot of other handy stuff in pretty much every application.

    5. Re:Rant time by Anonymous Coward · · Score: 0

      The problem is that wc isn't really meant to be used in the same way as Word Count in MSWord. wc is meant to be used in scripts, where you want to count space (or line) separated tokens. "Word" count is just some easy way to say "space separated tokens made of letters and numbers".

      It's quite obvious that wc isn't usefull when you need to count words in a formatted document, but it's not its purpose. Just like cat is not meant to display some text to your screen, but is meant to be used with other tools to build some more complex behaviour.

    6. Re:Rant time by sorbits · · Score: 1

      The shell is a programming language with which you can do basically what you want, e.g. you mention 'wc' also counts HTML tags, well, for that you have 'sed' to strip them and perhaps 'tr' afterwards to collapse double spaces etc.

      So the task at hand, at least when working with text or automating some process (e.g. synching files with a server, performing a database query and react upon the result etc.) can more or less always be done in the shell (programming language).

      A GUI is someone picking the most common actions and making these more easy to accomplish than having to do them from the shell (although the shell also have ways to introduce shortcuts), and also to make the actions possible for users without prior knowledge about the inner-workings of the "command".

      Most of the time most users are really doing the same things, and for this a GUI certainly is the best solution.

      I think a lot of people do get this point, and that's part of Apples success, because they offer us both.

      I use OS X myself btw and share equal love for both the command line and the Aqua/Cocoa interface.

  39. Re: Money money money money... by Anonymous Coward · · Score: 0

    Thanks, kaleidojewel. Now quit spamming the forums with your Amazon-affiliate-whoring links.

  40. I call shenanigans! by quandrum · · Score: 2, Informative

    It's even easier in MS Office v. X ( and we are talking about OS X, right?), it's in the freaking status bar, right next to page count and line count. I don't even have to use the mouse or the keyboard.

    This is embarrassing.

  41. Re:Money money money money... by jonfullmer · · Score: 1

    Save $2 more and buy it here

  42. Command lines. by uberdave · · Score: 1

    Having to grep against "(1)" is annoying

    It's stuff like this that newbies haven't a clue about, intermediates hunger for, and perhaps even a few experts don't even know. This is exactly why some people find the command line cryptic and clumsy.

    1. Re:Command lines. by Anonymous Coward · · Score: 0

      $ help count words

      by itself is enough on my system (sure, you have to read a bit, but whatever). Besides, there are only about 20 unix commands that really matter for processing data, the rest your average user doesn't care about anyway.

  43. Ignorance of the competition doesn't help by Angst+Badger · · Score: 3, Insightful

    I've been gleefully using the word counts in MS Word since the early 90's. There are actually two places you can get at them, and they're both readily accessible.

    Speaking of the early 90's, this reminds me of a conversation I had on a TeX mailing list around 1994. I was thrilled with the idea behind TeX and struggling with the implementation. In the course of getting some answers about the surprisingly difficult process of setting up columns of varying widths, I overheard a conversation in which some TeX zealot was meandering on about all the things Word couldn't do. The problem was that all of the things he was talking about were things Word could do. He simply never got familiar enough with the application to actually use it well.

    Word has its problems, it is true. It has a number of bugs that may or may not be a problem, depending on which features you use. Recent versions have become lumbering resource hogs without adding much new functionality. It lacks some expert layout features that would enable it to fully close the gap with real document layout software, though it's good enough 90% of the time. It's owned by Microsoft. It is, however, probably the most comprehensive and full-featured word processor out there. OpenOffice.org is getting very close, owing more to stagnant development at Microsoft than anything else, and may overtake it soon. I've started using it for complex documents and, most of the time, I don't miss Word.

    You see the reverse with GIMP advocates. The claim that GIMP is as good as Photoshop can only be made by people who don't know Photoshop very well and whose graphic output is mostly limited to web pages. GIMP isn't even close to Photoshop, and as opposed to the situation with Word and Microsoft, Adobe lavishes so much developer resources on Photoshop that the gap is actually growing.

    To return to the original topic, yes, wc is a handy utility. But it is really much more useful for data manipulation by programmers and other IT professionals than for anything else. And if you want to enlighten people about the virtues of commandline tools -- and they are indeed legion -- it helps if you don't immediately discredit yourself by discussing applications that you understand only very superficially.

    --
    Proud member of the Weirdo-American community.
    1. Re:Ignorance of the competition doesn't help by P-Nuts · · Score: 1
      word counts ... TeX

      I've never found a reliable way of getting a word count in LaTeX. You can't just parse the source as some words will be generated by commands in the body. All the methods I've tried for counting the words of the finished PDF/PS fall down on counting things like equations and page numbers.

  44. CLI+Mac=Oxymoron by ElitistWhiner · · Score: 1

    CLI is a bridge that Apple will burn along the path to acceptance and marketshare. netstat, chown, rm, nidump, etc... go away for users. An OS* on server systems will branch-off for admins to use CLI.

    CLI is a throwback to the *olde* unix days. Using it is a *time machine* experience akin to being there when there was only CLI to the machine. All studies have indicated that CLI is inferior to brighty shiny chrome widgets and windows. Even file heirarchies in unix are confusing when users are asked. Much preferred are *where* metaphors than heirarchies.

    1. Re:CLI+Mac=Oxymoron by Guy+Harris · · Score: 1
      CLI is a bridge that Apple will burn along the path to acceptance and marketshare. netstat, chown, rm, nidump, etc... go away for users.

      Most users probably don't even know that stuff exists. (Terminal is in the Utilities subdirectory of /Applications, and at least some of the commands might be installed only if you install the BSD subsystem.) I have no reason to believe that they'll go away any time soon.

  45. Unix? by devphaeton · · Score: 1

    Has the "unix" in Panther changed any since the "unix" in the last incremental iteration?

    Furthermore, iirc, OSX is still not technically capable of holding the "UNIX" badge from The Open Group.

    Whether that's a good thing or a bad thing is up for debate.

    Now, as far as having some tcsh commandline skills on OSX, that would surely be useful for some every-day puttering around on the desktop.

    But most anyone I know (primarily solaris, Linux, Freebsd and Obsd guys) who ran out and bought a powerbook or such for OSX either now dual boot or have wiped OSX completely for *BSD or *nuxPPC.

    A failing on their part, maybe?

    --


    do() || do_not(); // try();
    1. Re:Unix? by Ohreally_factor · · Score: 1

      Do you mean "not technically capable" as in it's not standard compliant or that it doesn't have TOG's blessing because they haven't paid the fee or even applied to TOG for this?

      If it's because of lack of compliance to POSIX or some other standard, do you know in what areas it is not compliant?

      --
      It's not offtopic, dumbass. It's orthogonal.
    2. Re:Unix? by Anonymous Coward · · Score: 0

      Well, it would seem most of the people you know are uninformed fools.

      OSX out of the box provides the CLI they want and a very powerful GUI they're too elitist to use.

      Their loss...

    3. Re:Unix? by Guy+Harris · · Score: 1
      Now, as far as having some tcsh commandline skills on OSX, that would surely be useful for some every-day puttering around on the desktop.

      Or for doing software development; I do that in a Terminal window. (At some point I need to do a little GUI stuff and see what I can find if I throw Ethereal to the Shark, though. :-))

      But most anyone I know (primarily solaris, Linux, Freebsd and Obsd guys) who ran out and bought a powerbook or such for OSX either now dual boot or have wiped OSX completely for *BSD or *nuxPPC.

      Well, I'm a UN*X guy (mainly Solaris at work at my previous job, mainly FreeBSD at home prior to getting the PowerBook, with Linux and assorted others thrown in as well) who has a PowerBook and I now run, err, umm, OS X on it. It's UN*X enough for me (and it comes with GNU make, rather than BSD make - perhaps that's a NeXTStEP-ism, as I think NeXTStEP might have antedated BSD make; development using automake/autoconf doesn't work well with BSD make).

  46. Re:OSX by vicparedes · · Score: 1

    Apple's website says OS X is "Unix Based." No need to explain it. And no, nobody here is pretending it is because we don't need to. We've accepted that fact a long time ago. You're the one in denial.

  47. Article seems to miss the point by Evil+Pete · · Score: 1

    Some things in GUIs are really easy. Some things are very difficult. Using word counting as an example is not good because it is implemented in Word if you bother to look around for a few minutes. And yet searching, in Windows anyway, is a real pain. Yeah sure they've got a nice search dialog but it has no subtlety to tailor it to what you want, it's ok for the plebs but for those of us who know better it just doesn't cut it. Combining tools like 'find', 'grep' and 'wc' does things you can't do on windows ... well not easily or maybe not at all. Most people don't care but most here on /. would which is probably why so many install stuff like Cygwin.

    For instance, yesterday I wanted to remove all my CVS directories for a code tree I was copying, to do it in Unix (QNX) is just:

    find . -type d -name "CVS" | xargs rm -rf

    I have no idea how I would have done that in Windows. It took seconds to think of that line and type it ... how long would it take me to figure out and select the options to do it. Finding and selecting options takes a lot of time relative to your typing speed if you touch type.

    --
    Bitter and proud of it.
    1. Re:Article seems to miss the point by Anonymous Coward · · Score: 0

      Sort directories by name, select all the crap named CVS, and hit 'delete'.

    2. Re:Article seems to miss the point by aflat362 · · Score: 1
      Start -> Search -> For Files Or Folders

      Type "CVS" in the Box - Click Search

      Select all the stuff that you want to delete and hit the delete key.

      Though . . . The unix find command is much faster than the pile of a search program that comes with Windows.

      --

      Conserve Oil, Recycle, Boycott Walmart

    3. Re:Article seems to miss the point by DrEasy · · Score: 1

      But one reason the basic user hesitates to use the command line is the fear of making mistakes. The "find" command you used as an example is a case in point. What if there's a mistake or a typo in your command, and you end up wiping out the wrong files? You better be sure that you know what you're doing!

      On the other hand GUI solutions usually provide an "undo" button, which is a nice safety net to have. Now I'm no command line guru, and there might also be an undo command somewhere in Unix, but if there is, I'm willing to bet most average users don't know about it either.

      I say both metaphors are useful, and I'm happy I have the option to use either.

      --
      "In our tactical decisions, we are operating contrary to our strategic interest."
    4. Re:Article seems to miss the point by Anonymous Coward · · Score: 1, Interesting

      find . -type d -name "CVS" | xargs rm -rf

      Have you considered that if a single one of those directory names had contained a whitespace character (not so uncommon these days), you might have hosed more than just CVS directories?

      I'm all for command line programs in general, but face it: the current set of utilities is sorely lacking in ways to deal with today's file naming practices of spaces, newlines and non-ASCII characters. These days, I consider properly-written GUIs to be far more trustworthy at file manipulation, and I'm very wary of GUI wrappers that simply pass off those operations to the command line. You never know when one unprotected shell variable can ruin your whole day (see "iTunes 2.0 installer").

      Maybe there needs to be something just slightly richer than plain text as a data interchange format? Something akin to "find -print0" and "xargs -0", but those are about the only Unix utilities that actually work that way so they have very limited scope.

    5. Re:Article seems to miss the point by Anonymous Coward · · Score: 0

      Faster to delete files by mistake as well. In fact, where I used to work. No one on a windows machine deleted files by mistake whereas it was a common occurance with the Linux users.

      The advantage of the two step search and delete in the GUI is that you can easily take a second to look to make sure you are not deleting anything you didn't want to by using an improper search string.

    6. Re:Article seems to miss the point by Guy+Harris · · Score: 1
      I have no idea how I would have done that in Windows.

      I'd have done it in Windows with

      find . -type d -name "CVS" | xargs rm -rf

      but that's because I have Cygwin installed in the Windows partition on the machine I have with Windows.

    7. Re:Article seems to miss the point by Guy+Harris · · Score: 1
      Maybe there needs to be something just slightly richer than plain text as a data interchange format?

      XML? I'd post a link to the LINUXML project, but it appears that the pages for it have gone away; here's a copy of some LINUXML stuff.

    8. Re:Article seems to miss the point by Evil+Pete · · Score: 1

      Yes good point. I should say I'm not a newbie with Windows having been an intense user since 3.0 but my complaint about GUI tools in this case is that actually selecting the options, even if you know them, is time consuming. But usually you don't know them and finding them is MUCH harder than glancing at a man page (for simple problems). Also the ability to construct complex actions based on piping between simple tools is one of the things that converted me from Windows (that and the horror of programming direct to the Win32 API ... some good things mixed with total crap ... but I digress).

      --
      Bitter and proud of it.
    9. Re:Article seems to miss the point by Evil+Pete · · Score: 1

      True. Which is why my command sequence was:

      find . -type d -name "CVS"

      followed by

      find . -type d -name "CVS" | xargs rm -rf

      So I knew exactly what I was deleting.

      Yep the rm command has its flaws. Undelete would be nice. But if that means I have to use an OS that isn't good enough then there's no point.

      Twice I've used a delete with bad consequences, once was in Tru64 and once was in Windows (in fact it was a deltree). In fact it probably wouldn't have mattered if it was in a more recent version of Windows because I probably would have just shift-deleted such a large directory since I can count the times I've needed a restore from the recycle bin in the last 10 years on one hand.

      GUIs are nice. And I really like them, but as time goes by I'm less and less impressed by their productivity.

      --
      Bitter and proud of it.
  48. PLEASE! It's all about the PIPE by Anonymous Coward · · Score: 1, Interesting

    The great advantage of unix tools is not which little tool is the greatest (that depends on each user), but the fact that you can combine them as you want with PIPE!!!!
    This is the great thing about command line unix; an astonishingly elegant solution if you ask me.

    jj

    1. Re:PLEASE! It's all about the PIPE by Anonymous Coward · · Score: 0

      Exactly. I wrote a shell script the other day to do some manipulations on the tags in some OggVorbis files. Turning

      TITLE=ArtistName / Title
      ARTIST=Various Artists

      (from a compilation album) into

      TITLE=Title
      ARTIST=ArtistName

      for 20 songs was relatively easy. Let's see you do that by hand in GUI without any typos.

      On the other hand, I use a GUI music player (Rhythmbox), because I don't need the esoteric ability of the command line to listen to music. Sound-Juicer is nice too, if only because I'm on dialup and Jack wants more libraries than I have.

  49. Re:OSX by Anonymous Coward · · Score: 1, Insightful

    Uhh, it's about as much Unix as *BSD and Linux, i.e. pretty much Unix in functionality, although not in certification.

    Admittedly, it had some fairly non-POSIX features a couple of versions back, but it's getting closer. Then again, other "Unixes" (especially Linux) are non-POSIX as well.

  50. menus by HarveyBirdman · · Score: 1
    Anyone with a picoliter of sense immediately turns off "custom menus" on a new install of Windows or Office.

    Custom menus violate so many user interface rules the Marines should be storming Redmond. I literally want to fling my own excrement at the project Office project manager who came up with that one.

    --
    --- Ban humanity.
  51. wc counts words??? by sootman · · Score: 3, Insightful

    I always use it to find how many files are in a directory (ls -R | wc -l) or how many Windows boxes are trying to root me (cat /var/log/httpd/access_log | grep cmd.exe | wc -l) or how many visitors I got from a Slashdot story (cat access_log| grep slashdot | wc -l) or how many files I've touched this year (ls -lR | grep 2004| wc -l) or...

    What I'm saying is, people who complain about the "how many ways do you know to count words?" example are missing the forest for the trees. 'wc' is one of countless small UNIX utilities that I sting together in new combinations ever every day. I don't write books or magazines, so I *never* care how long my files are in that sense. But seeing how many lines in a log file contain a certain string is useful every day.

    Besides, "In the Beginning..." was written back in 1998 or 1999.

    Beyond WC: The coolest things about unix in OS X is the interaction with the GUI. I can type "scp " and then drag a file from the desktop into the Terminal window and then finish with the destination server and path. I can be anywhere in the filesystem and say "open ." and a Finder window of the current directory will open. I can access the clipboard with "pbcopy" and "pbpaste" (though I must occasionally make a temp file and use 'tr' to change from Mac line breaks to unix line breaks). The final hurdle--dealing with two-part Mac files at the command line--will be solved in 10.4.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    1. Re:wc counts words??? by Anonymous Coward · · Score: 0

      Beyond WC: The coolest things about unix in OS X is the interaction with the GUI.

      Yes! It drives me CRAZY in XP when I can't just drag and drop a file into the cmd.exe window to insert its full path into the current command line. And I really hate the way copy and paste works between XP's CLI and GUI, also.

    2. Re:wc counts words??? by jonesy16 · · Score: 1

      Piping through wc seems like a tremendous waste of time and typing when a -c option to grep will do the same thing . . .

    3. Re:wc counts words??? by sootman · · Score: 1

      Of course, in unix, there are always many ways to solve a problem. But a lot of times I use several 'grep's and 'grep -v's and the way my mind works, I find it easiest to just cat the file first, run it through a few greps, change my query several times, and then get the result I want. Also, doing a 'wc -l' is just the first step--once I get it down to a reasonable number, I'll want to see the output, so I just press [up arrow], delete 'wc -l', and replace it with 'less'.
      ls -lR | wc -l
      huge number? no problem...
      ls -lR | grep 2004 | wc -l
      reasonable number? great!
      ls -lR | grep 2004 | less

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  52. Re:OSX by nine-times · · Score: 4, Insightful
    So what? Linux and BSD aren't Unix either, but people sometimes refer to them as "Unix" or "Unix flavors" or something along those lines, because, in many ways, they works similarly to Unix. If you know your way around a Unix box, with a few adjustments, you'll be able to figure out these other systems. And OSX isn't BSD, but a fair amount of it is based on BSD.

    Taking all that into account, I'm not sure what your point is. Maybe you were just trolling, but someone must not have thought so, since you were modded insightful.

  53. Um by HarveyBirdman · · Score: 1
    Who outside professional writers *really* need to count the words? And wouldn't professional writers be handy with their wordsmithing application of choice? I'm not sure this is the best example. You learn "wc" or you learn how to do it in your GUI program. Is one really harder or better than the other? Is this all sound and fury signifying nothing?

    Does wc work on file with formatting tags and header/meta information?

    --
    --- Ban humanity.
    1. Re:Um by Anonymous Coward · · Score: 0

      How bout students. Usually one is given an assignment and told it shoud be 1500 words or whatever...since that's a large slice of the word proccessor market I would imagine word count is a very important feature to many people. I've had many classes when I was a student that you would loose marks if it was more then 100 or so words off either way so I'd say I really needed that feature.

    2. Re:Um by Anonymous Coward · · Score: 0

      Nanowrimo authors need to count words...

  54. Not a flame -- like what? by glasse · · Score: 1

    This isn't a flame, but a serious question, because I like to know where the OSS tools stand when I advocate them, and highlighting their shortcomings is often a good way to get them improved. I've heard people complain that using the GIMP with a crappy window manager (ie. under OSX or Win32) sucks because you have to click on each window to get it activated, whereas Photoshop has one huge window with all panels as subwindows which are all active at once. I've also heard that OO.o and GIMP are hard to learn. Are these what you're referring to? If not, what's wrong with them?

    For myself, I'm not an artist, I'm a programmer, and I very seldom actually need to do art-y things, but when I have, I've been able to do it in GIMP, but usually with a little struggling (which I ascribe to unfamiliarity with the application and unfamiliarity with a graphics mindset). I've only used Photoshop once, and didn't put in the time to get it to do what I wanted. And I much prefer the expressiveness of "GIMPing" to "Photoshopping" a picture.

    Ethan

  55. Word Count in Word - Now put that in a document. by Anonymous Coward · · Score: 0

    What sucks is: that nice little window I get telling me all the stats for my document - I can't select the text, or copy-and-paste it.

    Along the same lines, ever wanted to send someone a listing of all the files you have in a Windows directory? Unless you open a cmd window, you'll be sending them a screen shot.

  56. Re:OSX by mclaincausey · · Score: 1

    What exactly makes you consider Linux to be more "Unix" than OS X? Are you using SCO's definition? What a strange post. And you appear to be so passionate about your delusion.

    --
    (%i1) factor(777353);
    (%o1) 777353
  57. WC in word. by pharhp · · Score: 1

    I am amazed that no one has come up with ALT, t, w for word count in word!! The GUI may make some things more complicated if you think the only way to do it is the mouse. In the words of Larry Wall TMTOWTDI

  58. funny they should mention find... by Jamie+Zawinski · · Score: 3, Insightful
    ...since the first thing one learns about OSX is that it makes traditional "find" incantations completely malfunction due to filenames with spaces in them: you have to re-train your finger memory from

    find . -type f | xargs foo
    to
    find . -type f -print0 | xargs -0 foo

    For a good laugh, try explaining why that is necessary to a Unix newbie!

    1. Re:funny they should mention find... by Guy+Harris · · Score: 1
      ...since the first thing one learns about OSX is that it makes traditional "find" incantations completely malfunction due to filenames with spaces in them

      I can't remember whether I first had to use -print0 on OS X or on FreeBSD.

      (Of course, OS X has more files with blanks that are its fault rather than the user's fault; I forget whether KDE on FreeBSD created any files under my home directory with blanks of its own volition, but OS X sure as heck does, e.g. under ~/Library.)

      But people who do find | xargs arguably should use -print0 and -0, if available, anyway, just in case somebody planted a file with a newline in the name just for fun, for example.

    2. Re:funny they should mention find... by Anonymous Coward · · Score: 0

      Spaces have always been acceptable, although rare, in unix filenames. All your example means is that the traditional incantations have always been broken. I cannot see that as a problem with OS X.

  59. Remove all CVS directories for a code tree by timcrews · · Score: 1

    In Windows Explorer, right click on the root directory of your CVS tree. Select "Search". In the resulting Search dialog, type "CVS", and start the search. In the right-hand pane of the search window, all of the CVS sub-directories of your root directory will appear. Click anywhere in that pane. CTRL-A for "Select all" (or do this manually through the menu system: Edit...Select All), and press the Delete key.

    Also, depending on your CVS client, the CVS directories will probably be marked as "hidden", in which case you do need to click on "Advanced options" in the initial Search dialog, and press "Search hidden files and folders" before launching the search.

  60. Re:OSX by blkmagic · · Score: 1

    BSD is UNIX. Not only that, it's one of the first UNIX certified operating systems. I can't tell you a great deal about the early days of UNIX, but University of California at Berkeley's computer science department did a lot of work with Bell Labs to create the original UNIX. UNIX is a certification and registered trademark, not a single operating system. There are different versions of UNIX, of course, and I understand the OS certification is a time-consuming and expensive process. Part of the advantage of the certification is that UNIX operating systems comply with a set of standard commands (and I think POSIX compliance is part of the whole process). Linux is not UNIX; you were correct in that statement.

  61. Pipe is the key by Anonymous Coward · · Score: 0

    The magical pipe is the key tool in command line not the programs. Using pipe and programs once can achieve any complex task through command line. For example if someone wants to take a wc on a file and use those numbers to trigger some action. Is this possible to do in GUI? Ofcouse you can, with a lot of clumsiness. Now can you do it in commandline? Ofcourse you can, with a lot of ease (Thanks to the pipe). So I guess as long as there is no GUI equlivanet of pipe command, GUI tools are clumsy than commandline equivalents on some fronts.

  62. VI assistance by Biff+Stu · · Score: 2, Funny

    Has Vigor been ported to the Mac? I for one could use an animated assistant when I'm working with VI.

  63. Re:Do you know how to count the words in a Word by Anonymous Coward · · Score: 0

    funny my version of Word has a running word count at the bottom of the page... so to get a word count i grep "eyes" ld [look down] (sorry for the lousy syntax my irony is much more developed than my unix).

  64. My hero! by RealProgrammer · · Score: 1

    Wow, that works! I'll use that until I get something better made.

    --
    sigs, as if you care.
    1. Re:My hero! by argent · · Score: 1

      Tcl is great for throwing these things together, and Tk one of the more platform-independent GUI frameworks. That script should run the same on Windows, Mac OS X under native Aqua or X11, or on any other X11/Unix combo.

      And it's not a lot of code.

      Have a look at something I created as a display tool for sticking on the end of a pipeline that's twiddling password-style files: viewdb.

  65. he just tricked you stupid bastards by datasetgo · · Score: 3, Funny

    heheh - just look how many of you just openly admitted to having Word installed on your machines. Jesus! And you call yourselves slashdotters...

    [it's a joke son, move along]

  66. Re:OSX by nine-times · · Score: 1
    Yeah, if you notice, there's a typo where I wrote, "They work S similar to Unix", where I had written the post for Linux only, because I wasn't sure about BSD.

    Now, ok, since we've had that correction, is it just 'BSD' that's considered Unix, or is is all the BSDs, (meaning FreeBSD, NetBSD, OpenBSD). Anyway, OSX uses the Mach kernel, which is based on BSD, and it runs some sort of BSD compatibility layer (though I'm not sure what that entails), as well as running many apps/tools that originated on Unix, and even containing some. So it's at least Unix-based, and Unix compatible, and Unix-like I guess?

    Someone correct me if I'm wrong. But still, my larger point, how much does the distinction between "Unix" and "Unix-like" matter, really? (as in, is it important to this discussion?) If someone says "MacOS is Unix" in this context, is it really necessary jump all over them saying "no it's not", except maybe as a matter of trivia?

  67. waste of time by Anonymous Coward · · Score: 0

    I just realized I have spent like ten minutes reading comments arguing about wc.

    what would we do without slashdot?

    well in case you missed something lemme recap:
    BLAHblahblahBlahBLAHBLAHBLAH wc BLAHBLAHBLahblah linux BLAHblah command line blahblahBLAHBLAH microsoft sux0rs blahblahblahblahblahblahblahblah BBedit blahblahblahblahblah count words paragraphs OR pages! blahblahblahblah

    yes another earth shattering story brought to you by slashdot.

  68. Re:OSX by Bulln-Bulln · · Score: 1

    Mac OS X is indeed not UNIX®.
    It doesn't ship with CDE and whatever is required to get a UNIX® certification, but on CLI level it's very simmilar to Unix.

  69. Smaller than Cygwin by Anonymous Coward · · Score: 0


    http://unxutils.sourceforge.net/

    The zip file easily fits on a USB memory stick. You can "infect" every Windows box you sit at.

  70. ntemacs by onlyjoking · · Score: 1

    (cough) you're forgetting something:

    http://www.gnu.org/software/emacs/windows/ntemac s.html

  71. Re:OSX by Anonymous Coward · · Score: 0

    CDE is only necessary for some UNIX specifications. The regular UNIX spec doesn't necessarily require any GUI stuff. Try to decipher what they have here. I can't.

  72. You've been 'schooled' ROTFL by Anonymous Coward · · Score: 0

    Another UNIX-ignorant bigot 'schooled'. Gotta love it.

  73. Re:OSX by zaphod_es · · Score: 1

    When you are in a hole just stop digging.

  74. Re:OSX by nine-times · · Score: 1

    oh, you mean when I'm "in the hole" of making a decent point and being modded "+5 insightful", I'm "continuing to dig" by admitting a minor mistake in my post, and asking a question or two? Maybe you should try contributing to the discussion if you have something to say. And I don't consider cryptic (and uncalled for) flames a 'contribution'.

  75. Re:OSX by Guy+Harris · · Score: 1
    BSD is UNIX. Not only that, it's one of the first UNIX certified operating systems.

    I don't see BSD mentioned anywhere on the list of certified products - do you have any information on some older version of the standard, e.g. UNIX 95, for which "BSD" is certified?

    I can't tell you a great deal about the early days of UNIX, but University of California at Berkeley's computer science department did a lot of work with Bell Labs to create the original UNIX.

    That's not exactly how "the early days of UNIX" went. The original UNIX came from Bell Labs; people at a number of universities, research institutions, etc. had their own sets of improvements to UNIX that they distributed to other licensees. The Berkeley Software Distribution was one of them; the Fourth Berkeley Software Distribution was arguably one of the most important, if not the most important, of those, and with 4.2BSD the Berkeley contribution was arguably as important as the contemporary AT&T contributions.

    But the "original UNIX" wasn't a joint effort of AT&T and UCB, although just about any modern UNIX has a significant number of BSD contributions (sockets, symlinks, etc.), whether the code came from Berkeley or was a reimplementation of stuff from Berkeley.

    UNIX is a certification and registered trademark, not a single operating system.

    Yes, that's what it is now, at least at the legal level, as per The Open Group's What is UNIX ®. Sometimes "UN*X" is used to refer not only to those OSes certified as "UNIX®", but to those OSes that haven't gone through the registration procedure but that are generally thought of as enough like other OSes considered "UNIX" to be worthy of the name. (I'd definitely put the major Linux distribution into the "UN*X" category, along with {Free,Net,Open,Dragonfly}BSD and OS X.)

  76. Re:OSX by Guy+Harris · · Score: 1
    Anyway, OSX uses the Mach kernel, which is based on BSD

    No, it's based on Mach.

    and it runs some sort of BSD compatibility layer (though I'm not sure what that entails)

    It entails kernel code implementing a set of BSD-flavored UN*X system calls, using Mach kernel primitives for process management, VM management, and the like, as per the Darwin kernel architecture page.

    Much of the BSD-layer code comes from various versions of BSD, perhaps modified to fit the architecture of Darwin rather than the BSD whence it came.

    I.e., /mach_kernel includes both the (non-BSD-derived) Mach kernel and a bunch of (BSD-derived, to a large degree) code that runs atop the kernel and provides the standard system call interface. (Other kernel-mode code is in "kernel extensions", i.e. loadable kernel modules.)

  77. Re:OSX by blkmagic · · Score: 1

    This article actually describes a pretty heated battle between AT&T and Berkeley/BSD, so I probably didn't have that clear in my head, but I really recall reading somewhere that it was a partnership early on with students working on the AT&T code. When it comes down to it, though, BSD and AT&T's System 5 UNIX had a great deal of common code - in particular look at the discussion of the TCP/IP code, which was a part of BSD UNIX used in System 5.

    I personally would never call Linux a UN*X OS because Linux was originally built (mostly) from the ground up to emulate UNIX, where most OSes that bear the UN*X tag originated from much of the same original source. Check out this cool UNIX history chart. Granted, the author definitely takes some liberties with the term UNIX, since the Linux tree and other UNIX-like OSes are included, but it's a pretty incredible timeline nonetheless. My understanding is that Linux and UNIX have very different takes on the kernel, and that to me differentiates the two trees enough that they should not both be called by the same term. That said, there's a great deal of code that's fairly portable between the two.

  78. Re:OSX by blkmagic · · Score: 1

    I don't know that it necessarily matters a lot, and I'm probably splitting hairs, but I personally don't refer to Linux as a UN*X OS, where I do refer to BSD/BSDi as one because of historical source. It doesn't make one better than the other, just refers more to how they came about and probably the underlying architecture of the OS.

    Mac OS X has its roots in NeXTSTEP/OpenSTEP, products of NeXT, founded by Steve Jobs after he left Apple, then sold to Apple before he came back. How's that for convoluted? ;) NeXT was also based on an earlier Mach microkernel and BSD 4.3.

  79. Re:OSX by blkmagic · · Score: 1

    Sorry, just one more link! This one is the official history of UNIX, which includes a number of the BSD releases in the timeline. Same site as you mentioned, and they do mention major Linux kernel releases there. I still don't consider Linux a UN*X; I categorize it as UNIX-like. :)

  80. Re:OSX by Guy+Harris · · Score: 1
    This article actually describes a pretty heated battle between AT&T and Berkeley/BSD,

    That took place after most of the BSD releases.

    but I really recall reading somewhere that it was a partnership early on with students working on the AT&T code.

    "Working on the AT&T code" in the sense of "directly contributing either to Research UNIX or to USG UNIX/System {III,V}", or in the sense of "taking AT&T code and adding stuff to it?

    When it comes down to it, though, BSD and AT&T's System 5 UNIX had a great deal of common code

    Because AT&T added a lot of what various SV-based UNIXes called, at the time, "Berkeley enhancements", i.e. they picked up BSD code, rather than being joint developers with Berkeley. (SVR4 picked up some more stuff, but that was as a result of a partnership with Sun rather than with Berkeley.)

    in particular look at the discussion of the TCP/IP code, which was a part of BSD UNIX used in System 5

    And which they picked up (through Lachman Associates, I think).

    My understanding is that Linux and UNIX have very different takes on the kernel, and that to me differentiates the two trees enough that they should not both be called by the same term.

    I suspect most commercial UN*Xes these days have sufficiently "different takes on the kernel" that the descent from original AT&T UNIX is a bit remote; the BSDs have diverged a fair bit as well.

    You can choose not to call them "UNIX" if you want, but...

    That said, there's a great deal of code that's fairly portable between the two.

    1. For a lot of that code, it's a bit more than "fairly" portable;
    2. there's a great deal of code that's "fairly portable" between OSes nominally ultimately descended from AT&T UNIX, and I deliberately use "fairly" there - the question is whether a given Linux distribution looks significantly different from "the average of all other UN*Xes" than does, say, AIX, from the point of view of the user, or the administrator, or the developer. I suspect that, except perhaps from the point of view of the OS developer, most Linux distributions are not significantly further from "the average of all other UN*Xes" than are other UN*Xes.

    I really don't care much whether the code was, once upon a time, code from AT&T; what I care about is whether a particular model of how the system works matches that of other UN*Xes. Linuxes have their deviations from the norm, but the same applies to many commercial UN*Xes. To pick one example, Linux distributions use ELF as their object file format, just as SunOS 5.x and many other SVR4 derivatives, and most of the BSDs, do; several commercial UN*Xes don't, including one BSD-derived commercial (partially open-source) UN*X. (Hint: it's the one that uses Mach-O instead. :-))

  81. Re:OSX by Guy+Harris · · Score: 1
    This one is the official history of UNIX, which includes a number of the BSD releases in the timeline. Same site as you mentioned, and they do mention major Linux kernel releases there.

    Arguably, they should mention Linux kernel releases in the second column, if they're mentioning 4.4BSD, although as they didn't mention 4.4-Lite (the version that didn't require an AT&T license), maybe they're only listing stuff that required an AT&T license.

    I still don't consider Linux a UN*X; I categorize it as UNIX-like.

    I reserve "UNIX-like" for something that is sufficiently incompatible with UNIX systems that it's hard to move yourself, or your source code, to them. I haven't seen any sign that Linux is any worse than, say, various commercial UNIXes in that regard. I use "UNIX-compatible" for a system that is intended to be able to let people used to UNIX just use it, and to let programs written for UNIX "just work".

    The term "UNIX-like" doesn't appear to be used as much these days; if that's the case, it might be that "UNIX-like" isn't as interesting these days - "close only counts in horseshoes".

  82. It will be more powerful under OS X 10.4 by MacDork · · Score: 1
    It's powerful because you can create intelligent scripts to automate tasks. Then you launch those scripts by clicking them.

    Imagine those utilities wrapped in Automator plugins. CLI for everyone, not just elitist dicks. Of course, that assumes you don't already consider us Mac users to be elitist dicks ;-)

  83. People seem to be missing a point about wc by Anonymous Coward · · Score: 1, Informative
    Let's say you have 50 documents and you need to know for some reason the word count or line count of each. Are you going to open up Word (or your fav editor) 50 times for that?
    wc -w *.txt
    This, for e.g., comes in useful when you need to count the total no. of lines of source code in a project (with multiple files in subdirs).
    find -iname "*.c" | xargs cat | wc -l
  84. Word counts in LaTeX docs? by jlusk4 · · Score: 1

    "How do you count words in a Word doc?"

    What, are we back in school, trying to figure out when we can stop typing on this 1000-word history essay that's due tomorrow?

    How do you count words in a LaTeX doc?

    I think the line-count option on 'wc' is much more heavily used (I know I use it just about every day).

    John.

  85. Style and Diction by BulbVivid · · Score: 1

    The command-line tools Diction and Style are worth a mention here. Diction gives grammar suggestions, and Style gives quite a bit of information about a document, including scores for 7 different readability indexes, number of "to be" verbs, sentence length, passive sentences, etc.

    Here are some of the results for a document I've been working on:
    readability grades:
    Kincaid: 11.2
    ARI: 14.6
    Coleman-Liau: 11.1
    Flesch Index: 66.5
    Fog Index: 13.2
    Lix: 50.7 = school year 9
    SMOG-Grading: 8.8
    syllables
    1035 sentences, average length 29.0 words
    65% (675) short sentences (at most 24 words)
    18% (190) long sentences (at least 39 words)
    1 paragraphs, average length 1035.0 sentences
    4% (51) questions
    33% (345) passive sentences
    longest sent 1422 wds at sent 1; shortest sent 1 wds at sent 672
    word usage:
    verb types:
    to be (412) auxiliary (168)
    types as % of total:
    conjunctions 3(967) pronouns 8(2297) prepositions 7(2038)
    nominalizations 0(59)

    I don't know much about using UNIX (very little), and fortunately, I found a page (http://lucas.is-a-geek.net/blog/2003/12/16/gnu_di ction_for_panther) with the commands to install Diction and Style, so I just did a copy and paste to install. Now I just open a Terminal window, type "style", drag the document to the window, and hit return. I've used it with plain text, rich text, and Word documents, and it likely works with other types as well. I've come to use Style quite often.

    From what I understand, the new MSOffice will calculate Flesch-Kincaid scores. Additionally, a GUI program called Flesh (VersionTracker) will give the Flesch-Kincaid scores.

    For those with little UNIX skill (like me), here are the commands, from Lucas Thompson's Web site, to install Style and Diction (they worked for me anyway, under 10.3):

    curl -O http://ftp.gnu.org/gnu/diction/diction-1.02.tar.gz
    tar xfz diction-1.02.tar.gz
    cd diction-1.02
    cp -f /sw/lib/fink/update/config.guess .
    cp -f /sw/lib/fink/update/config.sub . ./configure --prefix=/sw --quiet
    make -s
    sudo make install

    Good stuff.
    Jason

  86. Favourite command line program wc? by Anonymous Coward · · Score: 0

    Who ever made this guy 'famous'? Favourite is wc? He needs a shrink, not an audience. He needs to get out more - get a life!

  87. Re:OSX by nine-times · · Score: 1
    GP:Anyway, OSX uses the Mach kernel, which is based on BSD

    P:No, it's based on Mach.

    Ok, maybe I'm speaking too loosely, but wasn't Mach developed to be a microkernel replacement for BSD...? I'm not claiming to be a big expert here, and I don't know, maybe they didn't use any code taken from the BSD kernel, but wasn't it developed to fit into an otherwise BSD system, meaning the kernel and modules were developed to fit the specifications of a BSD system? I was under the general impression that the Mach kernel was not engineered to run a "new" operating system, but was written to serve the same purpose as the BSD kernel, sort of a drop-in replacement, just not monolithic in design. Or is that not right?

  88. GUI versus CLI by Saint+Fnordius · · Score: 1

    Actually, the main difference is that GUI interfaces are best for graphical/spatial uses and CLI is best for textual uses. That's why you rarely find a CLI version of Photoshop or QuarkXPress.

    If you imagine moving files as a visual act, then the GUI is better suited - you don't have to translate your thoughts into language. If, on the other hand, you know what you want to "tell" the machine, then a CLI is better. It's all a matter of the job at hand and individual preferences.

    So yes, in some jobs the GUI is as clumsy as pointing to a menu in a foreign land, but sometimes the CLI makes me feel like I'm saying "now pick up that, now what was that called again, widget and turn it 90 degrees to the left, then add a new thingy on the left side."

    Both have thair purposes, and neither is completely better than the other one.

  89. Re:How about first thought. by Retric · · Score: 1

    Tools > Word Count
    It shows Pages, Words, Characters (no spaces), Characters (with spaces), Paragraphs, Lines, and has an option to see if you want footnotes and endnotes included.

    Granted it only counts the characters you see and not all the formatting information that is in the .doc file but that's more useful to most people than what a wc on a .doc file would give you. Anyway maybe if people stopped trying to say that the GUI is useless we might be able to convert more people over to the command line.