?
Solved

Two easyish csh env questions

Posted on 2000-02-29
7
Medium Priority
?
358 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 150 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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 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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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