Solved

Two easyish csh env questions

Posted on 2000-02-29
7
339 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
Comment Utility
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
Comment Utility
(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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 84

Expert Comment

by:ozo
Comment Utility
alias e 'emacs \!* &'
0
 

Author Comment

by:kisrael
Comment Utility
Thanks ozo.

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

Expert Comment

by:rfi
Comment Utility
>>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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
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.:

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now