Questions tagged [tcsh]

Tcsh is an enhanced, but completely compatible version of the Berkeley UNIX C shell (csh). It is a command language interpreter usable both as an interactive login shell and a shell script command processor.

Tcsh is an enhanced, but completely compatible version of the Berkeley UNIX C shell (csh). 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.1

1Source:TCSH

40 questions
9
votes
2 answers

No csh or tcsh?

In /bin, I see bash, but no csh or tcsh. When I created a ".cshrc" file in my home directory, it had no effect; that's how I discovered this problem. So the question is this: how do I switch to csh/tcsh type of login? Thanks for your help.
user296662
  • 167
  • 1
  • 1
  • 7
6
votes
3 answers

check if folder does not exist in tcsh

When using the tcsh shell, how do I check if a folder does NOT exist? I can check if it exists by if ( -d /folder ) then but I want the if statement to work for folders that don't exist.
brain
  • 61
  • 1
  • 1
  • 2
3
votes
1 answer

problem with loading tcshrc

I have ubuntu 16.04 installed on my local pc and I'm trying to make my work environment as similar to the way it is configured at my job to achieve that I wanted to use the same tcshrc file (yes, we use tcsh, not sure why...) anyway, when I try to…
3
votes
1 answer

What is the analog of '$()' in tcsh?

I tried to do in tcsh the following: $ echo $(pwd) It does not work.
Josef Klimuk
  • 1,566
  • 5
  • 21
  • 36
3
votes
1 answer

Arithmetic with variables

I am trying to do arithmetic as I assign a variable a value. When the script reaches end_day it cannot do the math, and when I test it in the terminal it will simply return the expression. What do I need to do to get a result assigned to the…
WxPilot
  • 1,796
  • 2
  • 18
  • 25
3
votes
1 answer

Flexible vector construction in tcsh

vector generation is a technique which allows us to generate lists without defining iterators and write loops. They are useful in many situations, and can turn code to much more succinct and compact. They also facilitate quick composition of more…
arielf
  • 2,793
  • 2
  • 20
  • 35
3
votes
1 answer

Install software that uses a different shell

I would like to install cryoSPARC, and looking through the readme it looks like this program requires that the user use bash as their default shell. At the moment I'm using tcsh, and have built up a .cshrc file that I wouldn't know how to translate…
Suzanne
  • 31
  • 2
2
votes
1 answer

How can I make an equivalent to this bash function in tcsh?

I have a function in bash to kill all the processes, which contain the same name: killn () { pkill -9 -f $1; } I realize that tcsh does not support functions. How I can translate this function into an alias that will work in tcsh?
Josef Klimuk
  • 1,566
  • 5
  • 21
  • 36
2
votes
1 answer

Sourcing a sh file is illegal in tcsh

After solving that one, I tried to source the sh script editing csh.cshrc. I added the following lines in its end: . /etc/fsl/5.0/fsl.sh setenv FREESURFER_HOME/home/User/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.csh But I get the error…
Danis Fischer
  • 227
  • 5
  • 16
2
votes
1 answer

fsl.sh cannot be sourced

I need to install FSL and Freesurfer as part of running Connectome Mapper. Freesurfer required changing the shell to tcsh in order to configure its folders. Now for FSL, I have to add to .profile the line bash /etc/fls/5.0/fls.sh, but this line does…
Danis Fischer
  • 227
  • 5
  • 16
2
votes
1 answer

Ubuntu 14.04 and tcsh

I've tried the recommended method to install the TCSH shell in Ubuntu 14.04, sudo apt-get install tcsh but get the message: Unable to locate package tcsh Is there something else I need to download?
Mike Potter
  • 23
  • 1
  • 4
2
votes
2 answers

Create a folder with the date as part of the name in tcsh

I often need to create folders that start with the current date. For example 190627_ABCD. I've tried to create an alias command that gets the date to be printed: a newf 'mkdir `date '+%y%m%d'_`+=' But this results in printing up the += at the end,…
ZakS
  • 203
  • 2
  • 6
2
votes
1 answer

Unable to use variables in alias in cshell

This is a sample straight forward program. I am using C-shell and want a solution for this environment itself. Following this code sample: set FILENAME = "\!:2" alias jo 'echo this is my \!:1 file and its name is $FILENAME' on command line when I…
Jovin Miranda
  • 483
  • 2
  • 5
  • 9
1
vote
2 answers

Remove an initial part of a string in tcsh

I have a variable storing "ping_abc", how do I remove the "ping_" part to get just "abc"? My approach: variable 'test' stores "ping_abc" I tried: echo ${test:0:4} But this is giving me: Bad : modifier in $ (4), error Approach on suggested answer…
1
vote
3 answers

Cannot get "alias" command to work at al

Running Ubuntu 14.04 LTS I open a terminal, and type a simple alias command, but then it doesn't work: ~> alias ge='gedit &' ~> ge ge: command not found I've also tried adding aliases to .bashrc, .profile, .bash_aliases, all to no avail. What is…
1
2 3