Skip to main content

All Questions

Tagged with
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
1 answer
110 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
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)))
Aldron's user avatar
  • 1
2 votes
1 answer
75 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
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 ...
Aldron's user avatar
  • 1
0 votes
1 answer
229 views

comprehensive csh to bash translation [closed]

Is there a comprehensive dictionary to translate csh -> bash? I find many questions and answers which give piecemeal answers, but I'd like a comprehensive dictionary. I do understand that word ...
Robert Bruner's user avatar
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 ...
Anuraag Tummanapally's user avatar
1 vote
1 answer
416 views

How can correct these lines of sh script to avoid "syntax error: unexpected end of file"

#!/bin/sh init=step5_input rest_prefix=step5_input mini_prefix=step6.0_minimization equi_prefix=step6.%d_equilibration prod_prefix=step7_production prod_step=step7 # Minimization gmx grompp -f ${...
pkoduro's user avatar
  • 13
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 ...
vikas's user avatar
  • 19
-3 votes
2 answers
291 views

I'm using bash on Debian 11. But how may I open a Bourne, Korn or C-Shell if I am willing to?

I am reading a book speaking about Bourne Shell (the ancestor of bash = Bourne-Again Shell I'm currently using), Korn Shell and C-Shell. I was curious, and willing to experience them. On a bash ...
Marc Le Bihan's user avatar
0 votes
1 answer
928 views

How to open current path when creating a new tab in gnome terminal when using csh shell?

I'm on CentOS 7.9 (Gnome Terminal 3.28.2) with csh (yeah I know but work requirement) as my default shell. My problem is this: whenever I open a new tab in gnome terminal, the new tab redirects to ~/, ...
NoobAdmin's user avatar
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 ...
DaveC's user avatar
  • 1
0 votes
1 answer
763 views

running cshrc script in RHEL 7 from bash account does not work

I was given a software suite which is based around cshrc. Such that a user is supposed to source a setup.cshrc file and within that it sources numerous other .cshrc scripts to set up the environment ...
ron's user avatar
  • 7,264
1 vote
1 answer
701 views

How can I get my csh alias to work in bash?

This alias works fine in /bin/csh but not in /bin/bash: alias cd='chdir !* && setprompt; clear; ls -F' Basically, I would like to cd to any directory and ls in color.
Ivan Amador's user avatar
-2 votes
1 answer
118 views

Communicate the data or path from .sh file to .csh

I am able to execute the .csh file from .sh file. I want to pass the path from a.sh file to b.csh file when it starts to execute the .csh file. eg:- #a.sh if(result=0) then x=path/to/.csh #I want to ...
Suman Valsange's user avatar

15 30 50 per page