Skip to main content

Questions tagged [csh]

The C shell (csh), once one of the two major Unix shells with the Bourne shell. Csh had more advanced interactive feature but has been surpassed by modern Bourne-style shells such as zsh and bash.

0 votes
1 answer
29 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, ...
Clinton J's user avatar
  • 101
0 votes
2 answers
58 views

Find files created after a particular time in csh on SunOS

On my SunOS system, I'm trying to find all files created after 7 PM using csh, ls, and awk. ls -l "${Source_files_Dir}"/*.zip| awk -v today="$(date "+%b %d")" '{ date=$6&...
Aravind's user avatar
  • 1,619
0 votes
0 answers
17 views

Changing variables inside a csh script [duplicate]

I have a csh script and I have to callenter code here bash script that changes the value of an environment variable, like this: changevar file: #!/usr/bin/bash export FFF=0 beforevar.csh file #!/bin/...
Vitória Murujo's user avatar
0 votes
2 answers
114 views

Load files in sequential order

I need to load multiple files in my shell script with the same filename but appended in the front of each file name is YYMMDDPERSONNEL Examples: 231102PERSONNEL and 230103PERSONNEL There are many ...
teejay's user avatar
  • 9
0 votes
0 answers
32 views

Substitute square bus in csh script

I have input list: adr[0] adr[1] xadr[0] I want my output is: adr[*] adr[*] xadr[*] #! /bin/csh -fv set list = "adr[0] adr[1] xadr[2]" foreach f (${list}) set f_tmp = `echo "$f&...
ltdh's user avatar
  • 1
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 ...
Mastiff's user avatar
  • 101
0 votes
1 answer
115 views

C-Shell - stripping wildcards from user input

I am trying to strip wildcards from user input text in a c-shell script. I realize that the shell automatically expands all wildcards prior to storing the data. Is there a way to isolate the non-...
Eric's user avatar
  • 1
0 votes
1 answer
94 views

Calling a script from within csh with output redirection

What I would want: #!/bin/csh # call /myscriptpath/myscript.any and redirect 2>&1 and get retval and output set my_msg = `/myscriptpath/myscript.any` set my_ret = `echo $?` How to capture the ...
paulj's user avatar
  • 238
0 votes
1 answer
105 views

When logging into a UNIX/Linux box, which profile scripts are executed?

When logging into a UNIX/Linux box, which profile scripts are executed? Typically there are several different profile scripts that set the $PATH variable and other aspects of the user's environment. ...
drewhouses's user avatar
2 votes
1 answer
191 views

What does \!^ in csh alias do

Note: my shell is csh An ex-co-worker gave me the following command to put in my .cshrc: alias bastion 'ssh -L \!^\:<some_ip_address> <username>@<something.com>' Note that what is in ...
KetDog's user avatar
  • 137
0 votes
0 answers
134 views

Why do I get "Not a terminal" error during output redirection in csh?

Background: We have put some command outputs (both stdout and stderr) into the same file under the csh shell. Question: Why do we get the "Not a terminal" message in the following ...
lylklb's user avatar
  • 303
1 vote
1 answer
536 views

/etc/passwd shows bash SHELL, but my terminal starts up in csh

I'm trying to determine what is setting the shell to csh when open a terminal and log in. From the information I've read, the default shell is set in /etc/passwd, and I see an entry in the /etc/passwd ...
user3731622's user avatar
0 votes
1 answer
25 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)))
Aldron's user avatar
  • 1
2 votes
1 answer
74 views

Alias + and - in zsh?

For years I've used + and - as aliases for pushd and popd in both csh and bash. I've finally given up on my Macs and want to switch to zsh but I haven't been able to find a way to make these aliases. ...
sfjac's user avatar
  • 123
0 votes
0 answers
112 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 ...
Aldron's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
20