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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

tcsh .login in X sessions using fvwm window manager

Recently moved to xubuntu 20.4 from opensuse 42.3 and would like to preserve my long term habits. My window manager is fvwm, and my login shell is tcsh. What I noticed is that my .login file is not ...
user avatar
0 votes
0 answers
26 views

ssh to a remote terminal and bypassing dotrc files

I want to rapidly execute a remote command using ssh, for example ls -al /path/to/myfile. Unfortunately, I'm using tcsh rather than bash. My .cshrc file is quite long and slow, so I'd like to bypass ...
user avatar
  • 1,419
0 votes
0 answers
363 views

illegal variable name with csh and tcsh

Ubuntu 20.04 with update on about 1 May 2021. NOT a linux expert. in bash terminal, % which csh /usr/bin/csh but when % csh illegal variable name. same for tcsh.
user avatar
0 votes
1 answer
380 views

How to capture output from a command and pass it on to a variable in csh scripting?

I'm trying to capture output of command into variable in csh but its printing empty value to the variable. but if i run same command on terminal its working root_part_id=`gpart show | grep zfs | awk '{...
user avatar
0 votes
0 answers
31 views

xterm is calling .cshrc twice

The following command xterm -e ' tcsh' calls my .cshrc file twice. But this command calls it once xterm -e 'tcsh' Same thing with xterm -e 'cd `pwd`;tcsh' Obviously, the only difference between ...
user avatar
  • 1,419
1 vote
1 answer
2k views

Cannot login to cockpit after upgrading to focal fossa

Cockpit does not work for me on focal; it worked fine on bionic. According to "apt install cockpit", version 215-1 is installed, and it presents the login screen on https port 9090, but it ...
user avatar
  • 421
0 votes
0 answers
193 views

Why gives the error "Missing '}'.?

I am using the ubuntu under Windows. I had changed the login shell from bash to tcsh. After adding some PATH env into the /etc/profile , I need to source the profile. I ran source /etc/profile But ...
user avatar
  • 101
1 vote
1 answer
123 views

Shared library seems installed but I get an error anyway

Objective: Install/run an app through csh or tcsh, it's a 3d liquid simulation app called realflow. Background: I downloaded the app, try to run it through csh or tcsh. I get strings: 'lib/i386-...
user avatar
  • 11
2 votes
2 answers
801 views

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'_`+=' ...
user avatar
  • 173
0 votes
0 answers
118 views

Delay for tcsh scripts

I'm running Ubuntu 18.04. My login shell is tcsh. Whenever I run a script in this shell, there is about a half-second delay before it executes. Suppose I make an empty file, tmp, in my home ...
user avatar
  • 1
0 votes
1 answer
369 views

Redirecting foreach output into a file

The example below does not work: ~/test is empty. foreach i (`ls`) foreach echo $i > ~/test foreach end As well this does not work (unlike bash): foreach i (`ls`) foreach echo $i foreach end >...
user avatar
  • 1,476
0 votes
1 answer
705 views

Error while executing read prompt in csh and converting to multiline alias

Hey everyone i have this issue where i have a sample program in csh (i know its not the best language to use for scripting but i dont have an option here) its as foll: #!/bin/csh echo 'please ...
user avatar
0 votes
2 answers
4k views

Shell script to search for a pattern in a file using if else

This is my script, I want to find a pattern in a file. I know the exit status of grep -q '<Pattern>' '<file>' && echo $? is 0 if pattern is found. But I am getting if: Expression ...
user avatar
  • 3
2 votes
1 answer
971 views

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 ...
user avatar
1 vote
1 answer
2k views

wget in shell script using a pattern

So I'm currently trying to set up a shell script utilizing wget to download a huge amount of files from a server. I'm using the -A 'pattern*.extension' option to download only files with a specific ...
user avatar
0 votes
1 answer
125 views

Bash like installation suggestion in tcsh

In a bash shell, if you put some command that is not installed on your system, it throws an error and also gives you a package installation suggestion. For example- $ iostat Command 'iostat' not ...
user avatar
  • 253
3 votes
1 answer
210 views

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 ....
user avatar
3 votes
1 answer
702 views

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 ...
user avatar
3 votes
1 answer
1k views

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

I tried to do in tcsh the following: $ echo $(pwd) It does not work.
user avatar
  • 1,476
2 votes
1 answer
125 views

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 ...
user avatar
  • 1,476
0 votes
3 answers
264 views

tcsh and bashrc conflict

I'm a new user to Ubuntu and confront a problem through some process: There's a freeware called TDEFNODE coded with Fortran and runs under Ubuntu. So I've just installed Ubuntu 14 on a virtual drive. ...
user avatar
  • 1
1 vote
2 answers
415 views

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 : ...
user avatar
0 votes
2 answers
7k views

Unable to locate package "csh"

I tried installing csh, but it throws me the error: unable to locate package csh My Ubuntu version is 12.04.
user avatar
  • 1
0 votes
2 answers
2k views

exporting an environment variable from a bash script to a tcsh shell

I run bash scripts from tcsh shells. I want to set an environment variable in the tcsh shell from a bash script. The method of doing this, if your parent shell is bash is to source a file, i.e., ...
user avatar
  • 1,419
0 votes
1 answer
2k views

Odd Illegal Variable Name error in csh script

I have a peculiar problem with a csh script which occurs only in my Lenovo Z500 laptop. I have run the script in 3 other computers with analogous operating systems (Kubuntu 14.04 x64) and the only ...
user avatar
1 vote
3 answers
1k views

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 ....
user avatar
0 votes
1 answer
2k views

Setup: command not found. Cannot run installer

I'm installing Abaqus on Ubuntu. I have extracted the rar files into a directory. In terminal, I navigate to the directory and run the setup file using "sudo /directory_name/setup". Terminal gives me ...
user avatar
1 vote
1 answer
233 views

Is there an environment variable in csh to modify PS2?

Is there an environment variable in CSH to change the PS2 like in bash and sh? For example: $PS2 = "hi" I tried it but it doesn't work in csh.
user avatar
1 vote
1 answer
435 views

How do I turn off autolist in tcsh terminal

Since I upgraded to Trusty Tahr, whenever I do tab completion in the (tcsh) terminal it will complete as far as it can and then show me all of the options available. I hate this behavior and want it ...
user avatar
  • 15
2 votes
1 answer
3k views

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 $...
user avatar
2 votes
1 answer
2k views

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 ...
user avatar
2 votes
1 answer
3k views

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 ...
user avatar
5 votes
3 answers
38k views

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.
user avatar
  • 51
9 votes
2 answers
37k views

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/...
user avatar
1 vote
1 answer
82 views

how to display quota info on lock screen?

Is it possible to display user quota info on lock screen or any message at least? because every time user lock in or unlock the first window he/she will look at is going to be lock screen.
user avatar
1 vote
2 answers
2k views

Adding hours to an arbitrary, unformatted date

I need to add 84 hours to a specific starting UTC date. The start UTC date is the current date but the starting hour is not. The code below works great until the end of the month when it can't convert ...
user avatar
  • 1,696
3 votes
1 answer
151 views

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 ...
user avatar
  • 1,696
0 votes
1 answer
357 views

Gui application for perl scripts and cshell

I am a very green to Linux. I am now taking a course at my studies basic of Linux. As part of my assessment I need to do some Perl scripts and C shell. But also we have been asked to build a GUI app ...
user avatar
3 votes
1 answer
269 views

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. ...
user avatar
  • 2,663