Two easyish csh env questions

Posted on 2000-02-29
Last Modified: 2013-12-27
What's the syntax to set up an alias that runs emacs in the bavkground? So I can type something like   "e file1 file2" and have it run in the background (this is with X of course) while opening those two files?

At one point I hardcoded setenv TERM vt100 in my .cshrc, and now when I run an xterm, pressing backspace brins up ^H.  How can I get it so both delete and backspace work?

(Oh, and while we're at it: does csh generally have options for tab-completion and arrow-key-history recall, or do I need to upgrade to tcsh for that? This is on solaris)
Question by:kisrael

Expert Comment

ID: 2570490
i don't know anything about csh but you should get bash2.0 from .they have some neat packages there. bash will complete the tab-completion and will keep the history.

Accepted Solution

rfi earned 50 total points
ID: 2571959
(1) With csh aliases, this can't be done. You have to write a script.

(2) stty erase ^h

(3) This is not available in csh

In general, it makes no sense to use csh at all. tcsh is ways better, and I personally prefer using a POSIX compatible shell like bash or zsh - but that's a matter of taste.

Author Comment

ID: 2572882
I upgraded to tcsh on this solaris box.  (Ahh, it feels good after a week of wrestling with defeatured csh) I know a little bit about why people like bash and zsh, but it's one of those cases where I'm likelyto stick with what I grew up with til I see a compelling reason to change. (Do bash and zsh have tab completion and arrow key recall?)

Anyway, can you tell me what the tcsh "run in background" alias is? I used to know it... and then I can close up this question.
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

LVL 84

Expert Comment

ID: 2573766
alias e 'emacs \!* &'

Author Comment

ID: 2573789
Thanks ozo.

I should go look to some shell advocacy page...

Expert Comment

ID: 2575491
>>I know a little bit about why people like bash and zsh, but it's one of those cases where I'm likelyto stick with what I grew up with til I see a compelling reason to change.<<

As long as it is taken as an interactive shell, it really is a matter of taste, and tcsh is certainly an excellent tool. Thinks look different when scripting is concerned. There is (fortunately) a standard for scripting defined (it is in POSIX.2), and tcsh does not relate to this standard, while bash, zsh and ksh-93 do. So when you are starting to do scripting, you will have to learn the POSIX syntax anyway. Note that this applies not only to scripts you have to modify, but also to those you write yourself - you should better not write scripts in csh or tcsh [although tcsh corrects a few flaws of csh with respect to scripting]. See for details on this topic.

>> Do bash and zsh have tab completion and arrow key recall? <<



Author Comment

ID: 2576662
Ah, thanks.  
I'll probably stick with what I know, and use Perl for any non-trivial script.  (My scripting needs are generally pretty light, and can put up with Perl's overhead in exchange for its familiarity and ease-of-use.)

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question