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
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
2 votes
2 answers
364 views

Problem in reading text file into array in csh

I have a text file that looks like this - 1 29 12 1 22 17 1 20 43 1 48 30 1 3 0 1 21 25 1 18 9 1 14 1 1 44 45 1 52 26 1 NaN 27 1 13 46 1 5 37 1 34 23 1 39 40 whose columns I want to store into ...
Sanjana Hari's user avatar
0 votes
0 answers
42 views

Last login command, alias in csh

In the C shell, how can we display the login history of a particular user using an alias in such a way that the user only enters the alias name and the number of lines to be displayed without typing ...
learner'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
0 votes
0 answers
69 views

need to compare 3 variables and need to print highest of those three variables

set func_ssgnp_0p675v_m40c_typical_Ccworst_R2R_WNS = `grep -i Reg2Reg $tile/../sta/func/sta-max-func-ssgnp_0p675v_m40c_typical_Ccworst/reports/pba_proc_qor.rpt | awk '{print $2}'` set ...
Aditya Sai's user avatar
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 "...
Aditya's user avatar
  • 3
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
0 votes
0 answers
58 views

How to store multiple files in an array

I am using the split command in cshell to split a file into smaller files. Since the split command names the output files xaa,xab,xac.... i have to rename them. I want to store the split commands ...
coolguy123's user avatar
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
734 views

How to source a script code (set a variable) from another shell?

I tried to use FreeBSD. The FreeBSD root user uses csh by default. user@freebsd-13:~ $ echo $SHELL /bin/csh I know that setting a variable via $() does not work in csh. root@freebsd-13:~ # export ...
t7e's user avatar
  • 323
0 votes
0 answers
57 views

ssh session exits when cd command fails

I connect to a remote host using ssh. After connecting, if a cd command fails like below, my ssh connection exits right away. How can I prevent this from happening? scott@mac % ssh remotehost Last ...
lambda's user avatar
  • 101
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 $...
aroman's user avatar
  • 23
4 votes
1 answer
956 views

Use the parent directory from the symlink instead of where the directory actually resides on the filesystem

So let's set up the context. Two paths: /some/very/convoluted/path/name/the-wanted-directory /myhome I create a symbolic link in /myhome and then cd into it: /myhome $ ln -s /some/very/convoluted/path/...
Kit's user avatar
  • 1,073
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 ...
Krishanu Banerjee's user avatar

15 30 50 per page
1
2
3 4 5
20