All Questions
62
questions
0
votes
1
answer
30
views
cleartool command not found from .cshrc but found when manually called
I'm having an issue with cleartool commands called from my .tcshrc. I try to call cleartool setview, but get a cleartool: Command not found error. however, when I call the command from the terminal, ...
0
votes
1
answer
45
views
How can wildcard expansion create duplicates?
I have a directory with an absurd number of files, which makes this nigh impossible to understand by inspection. But here's the situation:
cp giant_folder/pre* myfolder
It's crunching along and ...
0
votes
1
answer
27
views
tcsh equivalent of bash command (deleting all but 10 most recently modified directoies)
Below keeps latest 10 directories and delete the rest. Works fine with bash.
What would be TCSH equivalent to bash below?
keep = 10
rm -r $(ls -dt */ | tail -n +$((keep+1)))
0
votes
0
answers
113
views
tcsh way of pattern substitution
I am using tcsh shell with Jenkins. In short, the matching suffix should be removed from the output.
Achieved in bash with the following.
cd ${WORKSPACE%${JOB_NAME}}
Case:
Given the following ...
0
votes
0
answers
266
views
recursive history search for tcsh shell
In bash shell, i generally use CTRL+R to fuzzy search a command that i executed recently.
However the same doesn't seem to work for tcsh or csh shells.
I want to understand if/how to do the same ...
0
votes
1
answer
640
views
How to pass a variable to a sed command in a csh script?
Unix & Sed noob here!
I have a requirement where I need to put a suffix ",waive" in case a line in a report containing a matching string.The matching string is part of another file "...
1
vote
2
answers
1k
views
while command not working when bash script is sourced in tcsh?
I had made a bash shell script which include while command but when I run the script using source command on terminal, it gives a syntax error message.
I need to use source because I have to set the ...
2
votes
1
answer
683
views
In tcsh, how can I keep '{' '}' in assigning a variable?
I am making a simple shell script using the tcsh shell.
I assigned a variable as a command to use later.
But brackets within single quotes disappear.
set aaa = "test '10' '{}' ' " ; echo $...
0
votes
0
answers
205
views
using 2 alias together in cshell terminal
lets say I have 2 aliases, each having multiple arguments.
It looks somewhat like below example
alias s1 "command1 -a -b -c"
alias s2 "command2 -d -e -f"
now if I run :s1 s2 in ...
0
votes
1
answer
484
views
Behaviour of single and double quotes depending on shell
I've been scratching my head for quite some time with this....
Inspired by this answer, I'm trying to run 'ack' and to find either a single quote or a double quote in source files.
Doing this in bash ...
0
votes
0
answers
3k
views
C-shell prompt color
I wan to change the color of my csh shell. I've edited my .cshrc file, following the instruction I've found here, and included this in it:
set yellow="%{\033[1;33m%}"
set end="%{\...
0
votes
1
answer
339
views
TCSH: 'Can't find string terminator' Error From perl -e in TCSH Script
I'm seeing this error from my tcsh script and I can't figure out why.
Script:
#!/usr/bin/env tcsh
foreach n (0 1)
set PERL_CMD = "perl -e 'print qq^RUNNING^; exit ${n} '"
echo "...
0
votes
0
answers
92
views
How can I prevent standard output from displaying as a standard error in csh or tcsh?
When executing a process in the background using '&', the standard output goes to standard error. This happens if an error is detected in the standard error output when executing a command, or if ...
3
votes
1
answer
3k
views
Using single quotes inside input of heredocs
I need some help debugging my tcsh script. It uses heredocs. The code:
<pre_setup> <<EOF1
<setup> <<EOF2
<command>
exit 0
EOF2
exit 0
EOF1
The <pre_setup> is ...
0
votes
2
answers
953
views
What does it mean <<EOF in (t)csh?
I have the following command:
wash -n <groups> <<EOF
echo hi
echo bye <<BYE
<commands>
exit 0
BYE
exit 0
EOF
<commands>
where <groups> are some groups and <...