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
Solved

Two easyish csh env questions

Posted on 2000-02-29
7
348 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
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

809 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