Questions tagged [tcsh]

tcsh is a Unix command shell based on the C shell (csh)

tcsh is an enhanced but completely compatible version of the Berkeley UNIX C shell. It is a command language interpreter usable both as an interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control and a C-like syntax.

109 questions
28
votes
1 answer

Can I "export" an alias to the SHELL that invoked a script?

I'm trying to write a utility script that defines certain aliases. My SHELL is tcsh (can't change that). I tried the following #!/bin/tcsh alias log 'less ~/logs/log.`date '+%Y%m%d'`'' Then I run it like this: ./myscript log The output I get…
RonK
  • 1,540
16
votes
6 answers

How can I automatically update the title in an xterm running screen?

This is a bit of a followup to this question. I'm working in tcsh within GNU screen in an xterm. I have the following in my .cshrc: alias res_t 'xtset -t %h:%d "(%u:%g)" %e' # reset titlebar res_t #…
11
votes
2 answers

After-the-fact remote nohup with tcsh

I have a tcsh instance in an xterm that is running a long-term (weeks?) process. The Xvnc server it's running under went out in the weeds; it's consuming 100% CPU and is unresponsive. (This is a known bug and I know that it's unrecoverable.) The…
wfaulk
  • 6,307
10
votes
2 answers

How to make auto complete available for directories in cdpath for tcsh?

I just learned the trick for setting up cdpath in tcsh and it looks pretty useful. However, it seems that auto-complete of sub-folder names doesn't come with it. Is there any trick available on that? It'd be really cool since I'm entering certain…
Derek
  • 289
8
votes
3 answers

vim can not execute unix command with :! due to shell changing

Our company uses red hat linux system and allocate everyone an account in /home. Unfortunately, our system is using tsch, which is not favorable for me. Moreover, as I do not have the super user permission, I can not use the chsh command to change…
JQK
  • 91
8
votes
2 answers

get value of an alias in bash

I recently switched from tcsh to bash, and I'm used to being able to do things like sudo `alias netstat` but since alias gives name=value in bash, I can't do this anymore. Is there an equivalent in bash, so I don't have to do sudo `alias netstat |…
Jayen
  • 522
7
votes
2 answers

Running commands as another user on their machine via ssh?

As part of my normal workflow I ssh into another user's machine, switch user to them, run a command, then exit out to my own machine again: ssh hostname sudo su user runcommand exit exit Is there a way to cut this down to a single line command?…
Esker
  • 73
7
votes
1 answer

command limits when pasting into tcsh (mac OS X)

I encountered a 1024 character limit problem when pasting commands into the terminal application (max OS X 10.5.8) running the TC shell (/bin/tcsh). This can consistently be reproduced by pasting the following commands into the terminal app: echo …
pygri
  • 173
7
votes
1 answer

Does bash have a hook to determine when child shell exits?

In bash I spin up a t/csh shell, which updates the tty input (stty erase ^H) in the .cshrc, but when exit-ing and returning to bash the backspace key no longer works. This is because bash uses readline and I need to reset the erase (stty erase…
vol7ron
  • 505
6
votes
1 answer

In tcsh, how can I fork multiple shell commands, wait until they all complete, and then do another command?

I want to do the following from the tcsh command line, preferably in 1 line: build_cmd1 & build_cmd2 & build_cmd3 & wait until all parallel build commands finish regression_cmd That is, I want to fork off a bunch of build commands, block until they…
Ross Rogers
  • 4,807
5
votes
1 answer

Linux: How to eval the contents of STDOUT?

Consider you have a file with some sort of terminal command. How might each line be executed? Can you pipe the output of more into an eval? %> more ./foo.txt Edit: After some help/guidance from the comments, I think I should also make note that…
vol7ron
  • 505
5
votes
2 answers

What's DING!? Shell prompt with time in it

I am using tcsh shell. I put time in my shell prompt. It shows me DING! sometimes, what's up with that? /home/snihalani on master at 2:55pm => /home/snihalani on master at DING! => /home/snihalani on master at 3:00pm =>
SurenNihalani
  • 679
  • 2
  • 13
  • 31
5
votes
4 answers

Redirect stdout to stderr in tcsh

From my understanding, the following should send 'test' on standard error in tcsh: echo test >&2 However, it instead writes 'test' to a file named 2, and when I look through my history, I find that what actually executed was echo test > & 2 I'm…
Nate Parsons
  • 1,625
5
votes
2 answers

Setting up tab-completion of paths in bash or zsh to resemble tcsh

I’m a long time tcsh user, but all the cool kids seem to be using either bash or zsh nowadays (that is, completion patterns for git or stuff are available for bash and zsh, rarely for tcsh). My problem is that both shells have behaviours regarding…
4
votes
1 answer

In tcsh, how can I silence the output of an already running background process?

If I've launched a job into the background how can I redirect its output to /dev/null or in some way silence its output? I didn't start the job like: CMD >& /dev/null & I started it like: CMD & Now that CMD is already running, can I silence its…
Ross Rogers
  • 4,807
1
2 3 4 5 6 7 8