Anyway, the script that I was writing was really not that complicated, but using vi (or vile, as it is properly known) makes me rapidly lose interest in doing anything, and I am not having any luck installing any of the minimal sets of emacs on the Linux boxes we use. (A good friend provided me the microEmacs source that he uses, but whatever variant of Linux we have at work does not have the term.h file defined--which I thought was about as vanilla as you could get when it comes to Unix/Linux variants.) Aggravating matters, I am using telnet to connect up, and it is astonishing how slowly everything seems to work that way.
I could put in a request to have our operations sorts install emacs there, but it would probably take a year or more for it to happen. You know the way that Dilbert parodies the security paranoia of Dilbert's corporate IT sorts? It is perilously close to being that way--although admittedly, we are running a prison system, so a fair bit of paranoia is probably appropriate.
Anyway, I mentioned a few days ago that I was replacing the soon to be dead hard disk on my older notebook so that I could run Windows and Ubuntu Linux dual boot. (The soon to be dead hard disk is now a 20 GB portable USB drive.) This is a pretty obsolete notebook--a Compaq NC6000 that HP gave me in 2007 when they upgraded my work notebook. Yet Ubuntu Linux, in Terminal mode, using emacs, runs like a bat out of hell! I was able to recreate the script in about ten minutes that took me at least an hour to do at work. Some of this is because I had to remember how to write csh scripts again, and remember how to use sed to extract just some of the information out of wc -l, but also, Unix/Linux is still a spectacular development environment for basic software development, once you get vile out of the way.
Of course, I am blogging from the Linux box!
Of course, I am blogging from the Linux box!
I haven't run anything but Linux ever since Vista was released. :-)
ReplyDeleteThe bloatware that is Windows does suffer in comparison when you put a good Linux desktop on the hardware that was previously Windows.
ReplyDeleteI had a box (800mhz Celeron processor) that had started out with Windows Me, upgraded to XP and was barely wheezing along with the fully patched XP. It no longer had a purpose so I put a couple of different Linux distros on it for screwing around and was astonished to find it was a useable box.
I'm wondering why anyone in their right mind would right a script in csh.
ReplyDeleteIf they are so security minded, why do they allow telnet access?
ReplyDeleteThe telnet access is only within the building.
ReplyDeleteWriting shell scripts for small things makes perfect sense. For big things, not so much. When I started at HP, I was given a 6000+ line ksh script to maintain. One of the things I did was refactor into several scripts, each of which was still too big.
I wasn't wondering about scripting - it has its place - but about using csh in particular.
ReplyDeletehttp://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
If you want to have the productivity tools on your Windows box, I suggest using Cygwin for these kinds of tasks. I work almost exclusively on Linux boxes, but I connect to them from Windows using an X-client (I actually like that setup since I can disconnect my X session, then reconnect to the same exact session at home from the VPN so I can get to my work exactly as I left it). For quick work on my things on my Windows machine like massaging raw data you can't beat *nix tools so Cygwin wins for me.
ReplyDeleteAs for csh vs. ksh, let's get into a nice flamewar on vi vs. emacs at the same time since we have nothing better to do and it's never been hashed over before...
You might not object to vi quite as much if you try vim, Clayton, but I still prefer emacs to either for 98% of my uses. But it's personal taste, since I also prefer ksh scripts to csh scripts.
jdedge,
ReplyDeleteWhen I wrote a script in csh recently, it was because I needed to have both stdout and stderr show up in the piped output of something.
I'm also a fan of MicroEmacs, but I will say that all the Linux systems I've seen recently have either pico or nano installed by default. I'm of the any editor but vi school.
ReplyDeleteI'd love to see a decent graphical editor on Linux, but I've not seen one.
ReplyDeletePico and Nano are simply worthless, as programmers editors. No better than Notepad.
That gnome's gedit doesn't have a workable regex capability I find simply dumbfounding.
Emacs and vi both work great in a console, but emacs is a bitch to learn, and vi is almost completely undocumented, so hardly anyone actually knows what it can do.
And vi doesn't have a GUI mode, and the various emacs' GUI modes are simply terrible, from a UI standpoint.
The editor in Eclipse, of course, has everything I could ask for, but it's got too much baggage to use as a standalone editor.
So mark me down as another Linux user who has yet to find a editor he really likes.
Maybe Bluefish?
jdege: Kate's pretty capable.
ReplyDeleteIf you've got X running, ScITE is a pretty nice text editor with syntax highlighting for lots of different languages. It works pretty nicely in Windows, too.
ReplyDelete