Questions tagged [csh]
The csh tag has no usage guidance.
66
questions
1
vote
0
answers
28
views
Pathname or word too long in Cshell
I am using cshell. And I know that there is a limit of 1024 character while setting path. But I have many path variables which I need to set. So, it is exceeding 1024 characters and I am getting an ...
2
votes
1
answer
2k
views
How to set environment variables by calling a tcsh script that sources another csh script
I'm unable to set environmental variables present in a .csh using another .tcsh that is sourcing this file inside it:
This does not set the environment variables:
$PERC_PATH/bin/runperc.csh ...<...
0
votes
1
answer
474
views
How to do a recursive filename `find` from the shell using a glob pattern with "set braces"
From the shell, I'd like to recursively search a directory for a given glob pattern. But I want to use set-braces-syntax in my pattern:
find ~/path/to/dir -name '*.{h,m}'
Here I'd like to recursively ...
1
vote
1
answer
978
views
Bash prompt: How to invert text white-on-black instead of black-on-white like tcsh
I'm a current tcsh user and have this setting in my .tcshrc file to set the prompt:
set prompt="%S MBP %s %~ [\!] "
My screen's text is usually black text on white brackground, but the %S ...
0
votes
1
answer
269
views
I want to loop though each sub-directories & check if *.v or *.sv file is present or not , if it is present then do some operation using csh script?
NOTE : I have made an attempt to implement this below logic for each sub-directories. But not able to do so.
#!/bin/csh -f
setenv option $<
switch ($option)
cd $option
foreach i (`ls`)
pushd $i
...
0
votes
2
answers
698
views
Customize csh prompt based on uid/superuser status
I'm trying to set up a condition where my csh prompt is customized to change username color and prompt character if I take on root privileges via "su". What's the most sensible way of doing this?
...
0
votes
1
answer
1k
views
Package not found for awk.exe and csh.exe in Cygwin 2.10.0
I'm upgrading from cygwin 1.7.35 to cygwin 2.10.0. But I could not find any package that contains awk & csh binaries (.exe). When I type info csh or info awk in cygwin(2.10.0) terminal it shows ...
1
vote
1
answer
8k
views
csh: How to check if symbolic link exists?
Symbolic link was create by command ln -s.
Tried if ( -e "$link" ) and if ( -f "$link" ). But it's not working.
0
votes
0
answers
438
views
How to script to read user input, then run in background itself even closing terminal in TCSH?
I am looking for a strategy suggestion. I am very new to Linux shell scripting. Just learning tcsh not more than a month. I need a script to automatically detects when is the result files are done ...
2
votes
3
answers
8k
views
How do I run a Python script from a C shell without specifying whole path?
I would like to run a Python script from a Hamilton C shell without having to specify the whole path of the script.
The first thing I tried was to add my scripts folder to the PATH environment ...
2
votes
1
answer
137
views
How to get piped output in color?
I am using FreeBSD with the csh shell.
As an example, in the terminal / screen I get color output for ls (eg. ls -lGs). But when I pipe it through more (eg ls -lGs | more) the output has no colour.
...
2
votes
1
answer
769
views
tcsh: how can we display the body of a foreach loop in history
I see that history doesn't display the body of loops. Is there a way to show them?
san: cd /tmp/test
san: touch abc
san: touch def
san: ls
abc def
san: foreach file ( `ls` )
foreach? echo "File is $...
1
vote
1
answer
13k
views
What's the equivalent of .bashrc for CentOS?
By configuring ~/.bashrc as desired, each time the user logs into their bash shell the configured settings (of .bashrc) will automatically be set. Now I must be missing something but despite thorough ...
2
votes
0
answers
148
views
RHEL 6 converting a BASH script to a CSH script
I have a BASH script( running on RHEL 6 ) that brings up a GNOME terminal, opens multiple tabs in that terminal, starts a server in each tab, names the tab after that server, and inserts the command ...
0
votes
0
answers
87
views
RHEL 6: GNOME: staring a *.desktop file in a shell different from the system default
I'm in RHEL 6 with bash as my default shell.
I have a script called startServers
I made a startServers.desktop file which I put on my desktop so I can have the convenience of clicking on an icon to ...