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
-1
votes
1 answer

Remove symbolic links only from a folder in tcsh

I need to remove a large number of symbolic links from a folder that has other files which I don't want to remove. Is there any easy way to remove only symbolic links?
ZakS
  • 1,073
  • 3
  • 15
  • 27
-1
votes
1 answer

why might the "exit" command in a linux shell not work?

I have a user which hangs when he runs a csh script that doesn nothing byt "exit"... # This is the x.csh script exit Then he... tcsh x.csh It hangs. "which exit" gives "exit: shell built-in command." Any ideas ?
daveg
  • 1,051
  • 11
  • 24
-1
votes
1 answer

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 '' '' && echo $? is 0 if pattern is found. But I am getting if: Expression Syntax error. if ( (grep -q '' '' && echo $?)==0 )…
sid
  • 113
  • 1
  • 9
-1
votes
3 answers

syntax error: unexpected end of file when sourcing a file in bash

I am getting unexpected end of file error when use using source command to source a file. I know how to use if..else loop in bash, this is a legacy script. The same script works properly if I run it in tcsh shell. Is there any way to make the script…
ArigatoManga
  • 594
  • 5
  • 23
-1
votes
1 answer

how to make gdb output only to the file

I'm not very into unix/linux, I'm using rhat linux with sh, tcsh shells. What I'm trying to do is to debug lifecycle of the object of the class by breaking on it's default, copy c-tors, on d-tor and on operator=; move operations are not defined…
Soup Endless
  • 439
  • 3
  • 10
-1
votes
3 answers

How to change dir in tcsh without chaging cd -

I am using tcsh. I want to create an alias where I cd into another directory and execute a command. But I dont want to touch cd -. How do i do this? Thanks in advance. Edit: PS: The other directory has a script that uses local relative paths,…
justrajdeep
  • 855
  • 3
  • 12
  • 29
-1
votes
1 answer

process a file with nested include paths (awk)

I'm new to awk. im using an executable awk script to process a master file. I run awk on this master file and form a variable which is a string representing the full path to another file, say file 2. Once obtaining this new files path, stored in a…
caimu
  • 1
  • 3
-1
votes
1 answer

use tree command output to create the same directory tree structure in different place

Is there command or UNIX utility that can take tree output like: . `-- First |-- data1 | `-- some_file -> /tmp/some_file `-- data2 and create the same tree structure in another place?
Roman Kaganovich
  • 618
  • 2
  • 6
  • 27
-1
votes
1 answer

Commands work on terminal but not in shell script

The following commands work on my terminal but not in my shell script. I later found out that my terminal was /bin/tcsh. Can somebody tell me what changes I need to do for /bin/sh. Here are the commands I need to change: cp source_dir/*/dir1/*.xml…
valar_m
  • 23
  • 7
-1
votes
1 answer

Why is error flagging the variable as undefined?

I'm trying to truncate a part of the file name of my present working directory. This is the code I am using: set test = "$cwd" | awk -F "/" '{print $3}' set USER_CUST = ${test:s/abc_//} (Explanantion: I want to cut out the "abc_" part from the…
Ambareesh S J
  • 97
  • 1
  • 9
-1
votes
3 answers

Assign variables value to a variable

Using the command line, I've defined two variables set a = 5 set b = 5 In addition I've set another variable, c, in which I am trying to assign a's and b's value. I tried - set c = $($a+$b) But I've got Illegal variable name. I tried - set c c =…
Alex Goft
  • 1,114
  • 1
  • 11
  • 23
-1
votes
4 answers

How to remove unknown file extensions from files using script

I can remove file extensions if I know the extensions, for example to remove .txt from files: foreach file (`find . -type f`) mv $file `basename $file .txt` end However if I don't know what kind of file extension to begin with, how would I do…
Ian Chang
  • 27
  • 1
  • 4
-1
votes
1 answer

How to read csv file using tcsh script and get current value of environ variable

I have this csv file (sample.csv) which looks like: variable,value var1,/value/of/var1/which/is/path I need to parse/read this csv using tcsh script. I am trying to compare current value of environment variable var1 with value given in this csv…
SAM
  • 95
  • 1
  • 2
  • 6
-1
votes
1 answer

error in Unix (scripts)

somebody knows what does this error mean? Missing -. in google I found nothing about this
lego69
  • 767
  • 1
  • 12
  • 20
-1
votes
1 answer

Run tcsh script without interruption after called from python

I am calling a tcsh script in my python program. The tcsh script takes 10-12 mins for completion. But as i call this script from python, python interrupts script before it executes completely. here is the code snippet. import subprocess import…
1 2 3
46
47