Solved

Two easyish csh env questions

Posted on 2000-02-29
7
351 Views
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)
0
Comment
Question by:kisrael
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Expert Comment

by:ucen
ID: 2570490
i don't know anything about csh but you should get bash2.0 from http://metalab.unc.edu/pub/solaris/sparc/ .they have some neat packages there. bash will complete the tab-completion and will keep the history.
0
 

Accepted Solution

by:
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.
0
 

Author Comment

by:kisrael
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.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 84

Expert Comment

by:ozo
ID: 2573766
alias e 'emacs \!* &'
0
 

Author Comment

by:kisrael
ID: 2573789
Thanks ozo.

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

Expert Comment

by:rfi
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  http://ing.iac.es/~cfg/notes/public/csh.html for details on this topic.

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

yes.

 
0
 

Author Comment

by:kisrael
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.)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

733 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