Questions tagged [tcsh]

tcsh is an enhanced but completely compatible version of the Berkeley UNIX C shell, csh.

Quoted from the manpage:

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.

tcsh is the default shell on FreeBSD & DragonFly BSD, and was the default shell on earlier versions on Mac OS X.

Since tcsh is completely compatible with , almost all versions of csh encountered are actually tcsh.

Official site: http://www.tcsh.org/

704 questions
6
votes
5 answers

SETENV: Bad : modifier in $ ($)

I am using the tcsh terminal in Linux. In the other terminal I normally used I set the path to some license file as follows: export PATH="$PATH:$MODEL_TECH" Tcsh shell does not recognise this command so I tried the following: setenv PATH…
reinhard
  • 71
  • 1
  • 1
  • 4
6
votes
2 answers

Colored manpages with tcsh?

I really like the colored manpages which can are achieved by export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;31m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export…
skorgon
  • 604
  • 4
  • 12
6
votes
1 answer

Issues with newline character while using ansi-term in emacs

I am trying to use ansi-term in emacs (configured to tcsh shell). I see some issues with newline characters being displayed. If I try the following from the terminal (ansi-term), I get the correct output: myterm > echo "Line1"; echo "Line2"; echo…
Pulimon
  • 1,776
  • 4
  • 31
  • 45
6
votes
2 answers

how do I guard against "foreach: No match"?

I've got a shell script that looks like this: foreach dir (i686.* amd64.*) # commands end The problem with this script is that if there are no directories matching those names then I get the following error: "foreach: No match." What's an…
dromodel
  • 9,581
  • 12
  • 47
  • 65
6
votes
3 answers

remove only the last extension from file name

I have file names that look something similar to this name_1.23.ps.png or name_1.23.ps.best or name_1.23.ps I want to take off the random file extensions on the end and be left with just name_1.23.ps Other questions similar to this use '.' as…
user1958508
  • 605
  • 3
  • 7
  • 10
6
votes
2 answers

Substitution of ! with sed leads to event not found

I need to change every occurrence of ! to : as field separators in a group file. sed 's/!/:/g' filename > newfilename But I get the error /: Event not found?
user2358660
  • 65
  • 1
  • 3
6
votes
2 answers

tcsh 'ls_colors' not working

I am using tcsh as my default shell. However, the LS_COLORS env doesn't seem to work. Here is my related env for ls: setenv CLICOLOR "true" setenv LS_COLORS "di=37:fi=00" Directories are suposed to be coloured white, but the result is they are…
Michael
  • 2,075
  • 7
  • 32
  • 46
5
votes
3 answers

Makefile Rules and If Statements -- How?

I'm new to Makefiles so please bear with me. I need to modify a Makefile so some rules call different utilities depending on a variable. Right now, a rule looks like: ci: [shell syntax for tool (A)] But now I need ci to have a different syntax…
RaytheonLiszt
  • 225
  • 1
  • 6
  • 15
5
votes
2 answers

Tcsh script does not exit

I am running CentOS 7, and I am having problems with tcsh scripts. I have a simple script called quittest. #!/bin/tcsh echo "Simple Test" exit 0 When I run quittest from the terminal, I get "Simple Test" And it does not exit. I can Control+C to…
Jared
  • 76
  • 8
5
votes
4 answers

How to run a tcsh shell command and selectively ignore the status?

I've got a tcsh shell script that I would like to stop with an error on nonzero status most of the time, but in some cases I want to ignore it. For example: #!/bin/tcsh -vxef cp file/that/might/not/exist . #Want to ignore this status cp…
Walter Nissen
  • 16,451
  • 4
  • 26
  • 27
5
votes
1 answer

Check if a string matches a certain pattern in tcsh

I try to match a user-typed string with a specific pattern, to be exact i want to check if the string starts with an upper case letter and then continues with any upper, lower-case letter or number. I want to do this in tcsh, I know bash is better…
Sebők Dávid
  • 55
  • 1
  • 1
  • 5
5
votes
1 answer

tcsh script if statement

I need to loop through a bunch of different scenarios (variable scen), but can't figure out how to use the if statements in the tcsh shell script. Getting the error "if: Expression Syntax" Can someone please tell me what I have wrong? Simplified…
user50679
  • 61
  • 1
  • 1
  • 3
5
votes
1 answer

Running Java process as Service in Linux

I need to run a Java process as a service in (Red Hat 6.4) Linux (It needs to run at boot time and stay up). I have it mostly working, except for it doesn't seem to status correctly in the "Service Configuration" window. To illustrate, I made a…
mainstringargs
  • 13,563
  • 35
  • 109
  • 174
5
votes
2 answers

minimal typing command line calculator - tcsh vs bash

I like to have a command-line calculator handy. The requirements are: Support all the basic arithmetic operators: +, -, /, *, ^ for exponentiation, plus parentheses for grouping. Require minimal typing, I don't want to have to call a program…
arielf
  • 5,802
  • 1
  • 36
  • 48
5
votes
3 answers

Broken pipe no longer ends programs?

When you pipe two process and kill the one at the "output" of the pipe, the first process used to receive the "Broken Pipe" signal, which usually terminated it aswell. E.g. running $> do_something_intensive | less and then exiting less used to…
PypeBros
  • 2,607
  • 24
  • 37