Given that Perl's about as ubiquitous as bash (and arguably more so, since I literally don't know any mainstream *nix that ships without Perl in the core, and I know several that ship without bash), why not just use Perl in the first place? This is exactly what it was designed to do well, back in the beginning.
For longer-term scripts over a few lines, it's easier to use a powerful language you're comfortable with (maybe one of Perl, Python, Ruby) than to waste time (re)learning shell scripting whenever you need to extend the script.
FreeBSD doesn't have Perl in the base system (but of course has it in the ports). Same with Bash though, but the Bourne shell is of course in the base.
— Tom Duff
(Minor remark: for smaller tasks [and instead of launching a terminal window] I prefer to use the DirOpus clone "worker" on UNIX.)
Then I picked up computers as a hobby. With all the random typing I did as part of the hobby I quickly found myself in the 70-100 WPM range.
You don't really need a typing tutor program with its learning modules and fluff. You just need to spend time typing. I recommend printing out a color-coded image[1] of a keyboard that shows which fingers to use for which keys and just spending a little time on http://typeracer.com every day trying to stay on home row and follow the color guide.
> Save yourself the embarrassment, and avoid posting on the comments section jwz's quote on regular expressions. You are not jwz.
"But unless you touch-type, you are neither awesome, nor you are in a position to judge the qualities of the world as an oyster or any James Cameron movies."
Thoroughly enjoyable read I must say.
I don't think I should learn touch typing to further increase my typing speed. Right now most of the time my pondering over coding problems is limiting my typing speed, not my ability to move my fingers.
But maybe it's worth learning touch typing to reduce the stress on the fingers and be more egonomic?
Traditional touch typing trains you to hold your hands in a consistent position over the keyboard. It's the act of holding your hand in the same position all day--whether that's over a keyboard or around a mouse--that leads to carpal tunnel syndrome.
(For the record: I touch type mostly the way I was taught to. My wrists do occasionally bother me. I'm 24. YMMV.)
Coincidentally, I'm trying to learn real touch typing as I think it could help me in Vim.
Personally my style is very anti touch, using 2 fingers for the majority of letters, which I don't have to look at the keyboard for but I probably take more glances at it that a touch typist. I think though in being proficient in navigating the symbols on the keyboard mostly makes up for the loss in outright English typing speed.
However, if you catch yourself needing to even just glance at the keyboard while typing basic stuff, you're not a touch-typist, no matter how fast you are.
Many people feel that being fast is good enough. It has been my observation though, that the lag between typos and their fix is considerably shorter (almost instantaneous) for touch-typists (they're looking at the screen as it's happening). Indeed, I'm always a tiny bit annoyed when while sitting next to someone editing code, they accidentally turn on caps and it takes forever for them to realize it (like 10 characters later).
In fact, the only other memetically famous touch-typing software I know of is Typing Of The Dead¹, and that's not exactly widely-available.
The key to learning how to touch type is just typing _a lot_. You might not be very fast (I'm not), but you can at least get your eyes off your keyboard and use more than one finger per hand.
Goes to show you don't really need to learn the whole process with some type tutor software. Though in terms of efficiency you may want to be aware of what they suggest. For instance, I think I was hitting the Y key with my left hand rather than right hand at some stage, but long ago changed that.
The only gripe i had with it was that it required typing two spaces after a period. I found this just plain weird, so I fixed it in the tutorial files.
I guess using a blank keyboard also helped quite a bit..
Emacs used to be considered 'expensive' in terms of disk/memory. These days, it really isn't.
Non-Linux unixes are less and less of a factor these days, and even most of those have some sort of packaging system where installing emacs is a quick operation, rather than a laborious download/compile/install.
Emacs itself has remote editing capabilities with Tramp, via ssh that obviates the need to fire up an editor on the target machine in some cases.
If your job involves sitting down at HPUX/Irix/AIX/whatever machines that haven't been updated since 1998, and don't allow remote access, yes, vi is probably a valuable skill. Otherwise, I think this argument is less important than it once was.
The thing is, though, the subset of vi you have to learn to is relatively small. You need to know how to enter and leave insert mode, how to delete, and how to quit with and without saving. (For a non-vi user, the difference between knowing and not knowing those simple things is significant)
This is generally enough to edit the few configuration files you may need to touch before you install emacs (network, sources.list, sudoers, etc).
So even though the use case is small and shrinking, the amount of "vi skill" you need is pretty low as well. There's really no good excuse to avoid it.
However, it's more likely that you will have some version of Vi. The one I'm thinking of is the Busybox version.
That is enough justification, especially when you're at a single user mode console on a ILO card when the machine won't boot and flames are coming out of everything. Vi is there for you and emacs SSH won't be saving you when the network is not up so you cant apt-get or yum emacs. It's also not the sort of time you want to start having to learn vi.
I know this because I've been there.
It's as important as it always was, much as pen and paper are.
ESC : q!
Because you never know when some commandline tool is going to drop you into vi (I teach them about the EDITOR variable, but sometimes you ssh somewhere and, you know...), and you need to know how to get out.
True story: the number one cause of issues with source code control systems is a vi session that the students accidentaly opened, managed to flee from with C-z, and didn't realize was still around with an open file holding the subversion lock and preventing them from committing their source code. I'd say I got 5-10 a quarter (~60 students in each quarter's session).
Any "Unixy" thing you have around these days will have more resources than most computes did in the mid 90s, and the need for a "lightweight" editor like vi is much, much smaller now than it was back then. Even my Buffalo router has nano.
For most Linux distros you install, you typically have nano, pico, joe, jedit or emacs or lots of other editors which (apart from emacs which is its own universe) largely follows the same conventions and at large gives transferable skills. These are IMO much more useful to know.
Why should I bother learning an archaic, non-standard editor from an era when "line-editors" were considered bloated? Why should it even be considered "relevant" today? Even more so, why should it be considered "essential"?
I really don't agree and I really don't see why vi-users insist everyone need to learn their favourite editor.
Arrgghhh!
man readline, and search (/) for inputrc.
ANY app that uses readline can be set to use vi OR emacs keystrokes and history, by setting an entry in .inputrc. If you use either editor regularly this will set your command line skills in lots of software all over the planet to warp speed.
If you write python command line programs, try "import readline."
Harumph!
FTA: "If you learn to use Emacs, you will automatically learn the hotkeys and keybindings in hundreds of applications in Unix."
His point here is not to learn Emacs because it's a good editor, but because the keystrokes transfer to "hundreds of applications in Unix."
Which is true enough. In the (bash etc) shell you can change that to vi keystrokes with set -o vi, and you can change the behavior of those hundreds of applications (like mysql, e.g) by having a .inputrc file, but by default, lots of those apps use emacs keystrokes.
Use whatever editor you want, for whatever reason you want. His suggestion is worth considering, for the reason he states.
Without starting a flamewar, I'd like to point out Emacs is a good editor.
If you are a vim power user, finding yourself using traditional BSD vi is likely to be an unpleasant experience, making the vim is great because vi is installed everywhere weak as an argument.
“Ed is the standard text editor.”
Let's look at a typical novice's session with the mighty ed:
golem$ ed
?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?
---Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
While I find myself using Emacs more that Vi/Vim these days, I still find Vi key-bindings useful in the less(1) pager, which I use extensively.
I've just discovered that less responds to Emacs movements, but for searching text I rely on the vi slash. Secondly, when navigating multiple files in less, the vi/vim "next/prev file/buffer" commands (n/p) apply.
Famous last words ;-)
Is emacs?
It seems to me that both religions are not 'standard' anymore. I tend to see pico, nano, joe etc. - occasionally vi (but not vim).
Why frig around with emacs, pico, nano etc when vi is always there and is the same?
though you wont find either on your fresh gentoo install
lolwat?
downvote all you want. but a clone of norton commander was and always will be a joke.
...saw several sysadmins using it to delete files named with dash because they didn't know "--" is posix for stop taking flags. and that's just one bad vice it foments.