tcsh

generate a core dump in linux

I have a process in linux that's getting a segmentation fault. How can I tell it to generate a core dump when it fails? ...

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 return you immediately to a responsive shell, on a SuSE8 or former releases. when i'm trying...

redirect STDERR in tcsh from .aliases

Hello, in tcsh I'm trying to redirect STDERR from a command from my .aliases file. I found that I can redirect STDERR from the command line like this. . . $ (xemacs > /dev/tty) >& /dev/null . . . but when I put this in my .aliases file I get an alias loop. . . $ cat .aliases alias xemacs '(xemacs > /dev/tty ) >& /dev/null' $ xemacs ...

Best resource for learning tcsh?

Hello everyone, The question is pretty self-explanatory... I am looking for websites or documentation that will teach the basics of tcsh shell programming. Thank you ...

Escaping double quotes with tcsh alias

I'm trying to run the following commands: replace -x "must " A2input.txt replace -x " a" -f -s ## A2input.txt replace -x to -s ## -a A2input.txt replace -x faith -f "unequivocal" A2input.txt And it'd be nice if I could just alias it to something short and simple like "a", "b", "c", "d", etc... However, some of those arguments have a ...

Can a shell script set environment variables of the calling shell?

I'm trying to write a shell script that, when run, will set some environment variables that will stay set in the caller's shell. setenv FOO foo in csh/tcsh, or export FOO=foo in sh/bash only set it during the script's execution. I already know that source myscript will run the commands of the script rather than launching a new...

In python 2.4, how can I execute external commands with csh instead of bash?

Without using the new 2.6 subprocess module, how can I get either os.popen or os.system to execute my commands using the tcsh instead of bash? I need to source some scripts which are written in tcsh before executing some other commands and I need to do this within python2.4. EDIT Thanks for answers using 'tcsh -c', but I'd like to avoi...

Python in tcsh

I don't have much experience with tcsh, but I'm interested in learning. I've been having issues getting Python to see PYTHONPATH. I can echo $PYTHONPATH, and it is correct, but when I start up Python, my paths do not show up in sys.path. Any ideas? EDIT: [dmcdonal@tg-steele ~]$ echo $PYTHONPATH /home/ba01/u116/dmcdonal/PyCogent-v1.1 >...

tcsh: How to change the file extension for multiple files?

Is there a one line command in tcsh to change the extension of a set of files? In the various DOS shells, I used to use the following: ren *.abc *.def This would rename all files ending in .abc to end instead with .def. In sed terms this would perform something like the following: sed -e 's/\(.\)*\.abc$/\1.def/' on the file names...

edit commandline with $EDITOR in tcsh

Today's Daily Vim says this: Assuming you're using the bash shell, the following can be helpful when composing long command lines. Start typing on the command line and then type Ctrl-x Ctrl-e, it should drop you into your system's default editor (hopefully Vim) and allow you to edit the command line from there. Once finished, sa...

echo nested quotation marks in tcsh

I have a tcsh script that generates a text file. One of the lines in the text file is: bla bla bla 'foo foo foo "bar bar bar"': etc etc; Note the nested ' and " and also the : and ; that must be there. The : and ; require the whole string to be surrounded by quotation marks. However, if I do that, I have trouble escaping the quotat...

How can I use aliased commands with xargs?

I have the following alias in my .aliases: alias gi grep -i and I want to look for foo case-insensitively in all the files that have the string bar in their name: find -name \*bar\* | xargs gi foo This is what I get: xargs: gi: No such file or directory Is there any way to use aliases in xargs, or do I have to use the full versi...

How can I hook into tcsh's TAB completion on Linux

I have some directories with a number of "hidden" files. One example of this is I'm in a source controlled sandbox and some of the files have not been checked out yet. When I hit TAB, I'd like the option of seeing these files. A similar question has been asked before: CVS Tab completion for modules under linux The answers to that quest...

how can I strip the filename from a path in tcsh?

Given this variable in tcsh: set i = ~/foo/bar.c how can I get just the directory part of $i? ~/foo ...

How can I bindkey ctrl-left to word-left?

I use tcsh and emacs. In emacs, I'm used to the ctrl-left bindkey moving me left by a word. I'd like to do the same thing in my tcsh terminal. I can do ctrl-b, but I'm just not used to it. It's not clear to me from the bindkey manpath how to specify the ctrl-left key combination. How do I do it? ...

How do I check for the existence of a file using a wildcard in Bourne shell?

What I'm looking for is something like: if [ -f "filenam*" ]; then ... fi But the wildcard (*) causes problems. I've also tried: if [ `ls filenam* > /dev/null 2>&1` ]; then ... fi Which may work in other shells but doesn't appear to work in Bourne shell (sh). Thanks for any help! EDIT: Sorry, not C shell, Bourne shell (s...

Ctrl-R to search backwards for shell commands in csh

I love this shortcut in borne shell, and want to find out if it is possible to simulate and/or have (perhaps to install an add-on or with a script) it in csh or tsch thanks ...

what are good resources to get the most out of csh or tsch?

I would like to get the most out of working in cch or tcsh shell. I am looking for general tips (post them away), online tips, or book. Thanks ...

Display only files and folders that are symbolic links in tcsh or bash

Basically I want do the following: ls -l[+someflags] (or by some other means) that will only display files that are symbolic links so the output would look -rw-r--r-- 1 username grp size date-time filename -> somedir -rw-r--r-- 1 username grp size date-time filename2 -> somsdfsdf etc. For example, to show only direct...

Shared Libraries in Same Folder with App in TCSH

Hi, I am deploying a locally-compiled app to a remote Linux server. Since I don't have root account I cannot put needed shared libraries to /usr/lib Is there a way to overcome this? I put libraries in same folder and changed "path" variable but did not work. ...