Questions tagged [csh]
65 questions
14
votes
2 answers
How do I add a location to my path in Unix?
I am using a default installation of FreeBSD, with the C shell (csh).
Suppose I have a command I can run by executing this: /sbin/abc, but cannot run by executing abc. How can I set certain path or something that make abc runnable everywhere?
Andy Leman
- 325
- 1
- 2
- 11
11
votes
3 answers
What does ~ mean in a Linux shell?
I'm new to Linux and have been seeing this often. Could someone explain the concept here?
~/.somefilename
What does the ~ (tilde) signify?
d-_-b
- 325
- 2
- 4
- 16
11
votes
6 answers
Is there a way to escape single-quotes in the shell?
E. g. I want to say
perl -e 'print '"'"'Hello, world!'"'"', "\n";'
Is there a less awkward way to do it, e. g. escaping single-quotes?
Yes, I know that I can write
perl -e 'print q[Hello, world!], "\n"'
perl -e 'print "Hello, world!\n"'
But this…
codeholic
- 455
- 3
- 6
- 14
10
votes
2 answers
How to make auto complete available for directories in cdpath for tcsh?
I just learned the trick for setting up cdpath in tcsh and it looks pretty useful.
However, it seems that auto-complete of sub-folder names doesn't come with it. Is there any trick available on that? It'd be really cool since I'm entering certain…
Derek
- 259
- 1
- 6
7
votes
2 answers
find files within a specific directory structure but a variable parent directory structure
I want to use the find command in linux to find a specific file nested within a specific directory structure, say dir1/dir2/reqdfile.
But this directory structure can itself be nested within any parent directory structure.
Is it possible to a search…
Rohit Banga
- 2,354
- 10
- 32
- 41
6
votes
6 answers
Is it possible to open a file to a specific line number as formatted in grep -n results?
I often use grep with the -n option to list line numbers, e.g.
$ grep -n xyz .*
/ext1/acheong/foo/bar/a.cc:42: inline bool abc(int xyz);
/ext1/acheong/foo/bar/a.cc:43: inline bool def(int xyz);
/ext1/acheong/foo/bar/b.cc:415: int…
Andrew Cheong
- 1,588
- 6
- 22
- 43
6
votes
6 answers
How do I set $ variables in unix?
For example there is a long path that I cd to very often. How do I store the path in a variable so that I can use it everytime?
For example: I wan to be able to do this
cd $path
instead of
cd /a/b/c/d/e/f
everytime.
Lazer
- 17,227
- 43
- 116
- 141
5
votes
1 answer
How to write a setevn/export script that will work in both csh and bash?
In my environment (RHEL) I have a bunch of script that are written in either csh or bash.
Some of them are used to deal with a tomcat server.
I want to keep the definitions of CATALINA_HOME and CATALINA_BASE in one place, such that csh and bash…
Anthony Kong
- 4,868
- 11
- 48
- 80
5
votes
3 answers
How to run a process and completely detach it of its parent shell
Possible Duplicate:
Leave bash script running on remote terminal while not logged in?
How do I detach a process from Terminal, entirely?
I'm running a program on a linux server that will take days to complete.
I'm launching it from my workstation…
Benoit Duffez
- 594
- 8
- 22
4
votes
2 answers
Unix "time" command with pipeline prints no time-report
Of the two C-shell aliases below, only the first prints the time command's report of elapsed time. How can I get the alias with the pipeline to also print the time report?
alias make1 'time make'
alias make2 'time make |& tee make.log'
Stan
- 7,215
- 35
- 97
- 142
4
votes
1 answer
csh: how to test for blank correctly?
I want to test if a variable is totally empty in csh.
set R='dddd aaa'
if ( '${R}' ) then
echo not empty
else
echo 1111
endif
However it apparently does not work.
It gives this error message:
/usr/bin/test: argument expected
if:…
Anthony Kong
- 4,868
- 11
- 48
- 80
3
votes
2 answers
Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh
I want to transfer an environment variable over SSH.
The "correct" way is using SendEnv/~/.ssh/environment, but that requires the server to support AcceptEnv or PermitUserEnvironment, which it does not in my case.
So instead I am thinking to set the…
Ole Tange
- 4,529
- 2
- 34
- 51
3
votes
3 answers
In csh/tcsh, how can I incorporate literal curly braces into a command that's processed with eval?
To give more details, the situation is this.
I'm trying to prepare modulefiles (i.e., of the type used by the environment-modules package) to set up environment and aliases for third-party software. Some of the aliases, in particular, are giving me…
Valtandor
- 31
- 1
- 2
3
votes
1 answer
Bash alias history substitution similar to \!* in csh
My question is very similar to that of this old post.
I would like to do something similar: place in an alias the last argument(s) typed on the current command line. This would be equivalent to the csh \!* which can be used in aliases.
According to…
bossNova
- 73
- 4
3
votes
0 answers
Converting csh or tsh scripts to Bash
I am looking for a tool that can convert scripts written in csh or tcsh to a bash scripts. At least on the basic stuff so that I don't have to go through the process of translating everything from scratch.
Flethuseo
- 969
- 1
- 6
- 16