No, Word is a word processor, and is therefore different from a text editor in concept and in execution. Word processors focus on formatting and markup: Making text bold, underlined, double-spaced, right-, left-, and center-justified, and otherwise pretty. In the Linux world, this is (traditionally, seeing that Linux has programs such as KWord now) done by programs like LaTeX after the document has been written in a text editor.
A text editor focuses on, well, editing text. A deceptively simple concept that can be complicated mightily (witness EMACS, an operating system masquerading as a text editor :D). Text editors can execute complex search-and-replace commands with regular expressions, define macros to accomplish fairly complex tasks, edit compressed files directly, and other tasks that concentrate on doing amazing and sometimes obscene tasks with plain ASCII text.
There really is no comparison between text editors and word processors. They are used for different things and must be approached differently. Confuse them at your own risk.
There are a lot of nice little things here and there, but one thing remains constant. When someone throws you at a system that you have never been on, or have limited control over and you need to edit something right there…
Gosh, no one installed emacs. Hope ya didn’t get rusty on your vi commands!
I agree. That’s why, when I go camping, I only sleep under a pile of moldy leaves. Sure, I could bring a tent and a sleeping bag and a change of underwear and it’s all really nice, but at some point I’m going to be lost in the woods with nothing but a pile of moldy leaves, so I might as well learn to like it now.
OK, I’ll stop hijacking this thread now. Instead, I think I’ll go try to figure out how to type the letter ‘l’ using vi. Let’s see, I just need to exit “backspace” mode and enter “typing” mode. (Types a lot of colons and slashes and exclamation points) Whoops, I entered a ‘c’ by mistake. Better enter “delete” mode…
Cept vi ain’t akin to a pile of moldy leaves. It’s more like a very nice tent that requires secret codes just to open the flap. And of course it fits in your pocket.
It is an extremely powerful and fast editor. It’s just hard to get used to unless you are forced to endure it for awhile. Most who get that treatment end up loving it.
And try telling someone who’s paying you beaucoup bucks, “Sorry, I can’t do that for you until you let me install emacs on your system”
Hmm, I think I’ll go try to figure out how to put a # mark at the beginning of each line in vi…
:%s/^/#/
wow, that was fast
My only complaint with redirecting all output to a file is that you have a growing file in your home directory. since he’s on a hosted site, I assume he has a disk quota. Also, if it were me, I’d want to know right away if it doesn’t work, but wouldn’t need to know if it does work.
Re Editors:
vi or emacs?
When I need to use one or the other, I use vi. But when it’s available, I use pico. it does exactly what I need it to do - no more, no less.
Derleth, comments that end in sh*t-eating smileys are jokes, not serious opinions. They are intended in different ways and must be approached differently. Confuse the two at your own risk.
This is why, even though I mock vi users, I also secretly fear them. People who know regular expressions are the truly powerful ones among Linux users. I suck at regexps. And every time I go to buy the O’Reilly book on them, I can’t go through with it, as it is a thin little book, but still costs a lot ($30? $40?). Which is fine, because I hate and fear them anyway, so it’s not like I really want to read about them.
Basically, I learned enough regexps to write a few generic search and replace scripts, and since then I’ve pretended they don’t exist. They’re happy. I’m happy. Everyone’s happy.
I have never yet seen any computer that had an operating system, but lacked pico. And if I were ever in a situation where I didn’t even have pico, I would use a nice, intuitive tool like cat or echo rather than vi.
And by the way, Giraffe, don’t knock sleeping under a pile of leaves until you’ve tried it. Let me assure you, it’s much more comfortable than a text editor where the default mode doesn’t let you enter text.
Well then Chronos, you’ve never seen a standard install of Solaris, FreeBSD, BSDi, IRIX, et. al.
Come to think of it, I don’t think I’ve used a non-Linux system that came with pico in a normal install. Sure, you could pull it down pretty quickly on BSD via ports, if your situation allows for it, and you have root.
If it weren’t for it’s very common absence on these OSes, which represent the bulk of commercial *nix servers, I probably never would have learned vi. I am very glad I did. After so many years using it, I’d use it in Windows if I had it.
Intuition is nice at first, but what matters in the end is efficiency. Big learning curve on the damn thing, no doubt there. But when ya know it, it’s magic.
OK, one more followup question. Can you guys recommend a nice How-To-Use-Linux-as-an-Enduser book? To use a car analogy, I don’t need to know how to fix the engine or overhaul the transmission, but I would like to know how to change the oil and check the tire pressure.
Dewey: Running Linux, published by O’Reilly, gives you a good enough idea of the OS to immediately do the basic stuff and a good start at doing the complex stuff. I have it and I love it.
For distro-specific information, well, how did you buy your distro? Bundled with a book (how I bought my Linux OS)? Then read the book for information. In a box? I imagine the box would contain dead-tree docs of some type. Check your system’s pre-installed documentation as well (try running ‘info’ for a list of topics). I don’t think anyone cognizent enough to get a distro by grabbing and burning ISO-9660 images would need help doing the basic stuff.
For application-specific stuff, well, there is a plethora of information available in your machine already. Try ‘man’ or, better yet, ‘info’ from the command line. Try the program’s own help commands. When in doubt, execute the program from the command line with ‘–help’ as the only argument. It’s bound to say something.
My point is that you don’t need a book to run Linux. I rarely use the text I have, as much as I like it. It’s just that any modern distro, especially one aimed at end-users, has so much information installed with it my problems are usually solved with a few keystrokes. Unlike Microsoft ‘Help’, Linux docs have a habit of actually being helpful.
I have to agree with what Derleth said [sub]friggin’ vi user[/sub]: for most Unix commands, the easiest way to figure out how to use it is to just look at the man page or type [command] --help or -h. For really basic stuff (e.g. changing file permissions, writing a basic shell script, etc.), it’s nice to have a book of some sort. So, I would focus on finding a book that just contains the basics and not bother trying to find a book that tells you what all the different switches for the tar command mean.
I have “Unix in a Nutshell” also published by O’Reilly, which I find to be a nice concise reference. A little terse for an absolute newbie, but it has a little bit of everything (even vi commands).
Joe_Cool, yeah the point you made about the logfile vs. /dev/null is certainly worth thinking about. Mebbe after the script has run for a week or to, that might be the better way to have things set up long term.
Hm. Well, I would still recommend the books (Running Linux and Linux in a Nutshell (You’ll be getting very used to the O’Reilly series if you do anything serious or semi-serious with Linux or computing/programming in general, as they are the best reference/teaching books on a wide range of topics.)) and you should get a shell account, if you don’t already have one. A shell account is a way to get a command line session going using something like ssh (secure shell, like telnet except that it’s secure*). Shell accounts are a Good Thing. Get one if you don’t have one already.
*Caveat: WinDose boxen might not have ssh on them, but a (relatively crappy) telnet program is part of the standard installation at least up through WinME. You will want something better than that if you start getting interested in your little shell account. Of course, if you start getting interested in the shell you should install Linux. It’s cheap and easy.