Skip to main content

All Questions

Tagged with
0 votes
2 answers
115 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
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
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
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="%{\...
Mr.Seven's user avatar
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 ...
vesii's user avatar
  • 203
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 <...
vesii's user avatar
  • 203
0 votes
1 answer
2k views

Without nohup on csh, background job still running after ssh exits

I'm trying to understand the need for using nohup with background commands in ssh. My shell is csh on CentOS. The background command below continues running even after ssh exits. I was expecting this ...
neo_coder's user avatar
0 votes
1 answer
1k views

error while using sed in tcsh alias

I am unable to "source/run" my tcsh alias, which is as below: alias inp1 "grep -i "final_model" /scr/cb2TempProd/tmp/$USER/\!:1/Simulation/Input/assemble.preprocessing | sed 's#.*<##; s/>$//'" ...
Nayak's user avatar
  • 65
1 vote
1 answer
2k views

How do I cd and then ls in my cshrc

I want to be able to cd into a path and have it ls automatically. I have tried doing a function such as cs() { cd "@a" ; ls} but this results in an error saying "badly placed ()" so I do not think I ...
Makuza's user avatar
  • 13
1 vote
1 answer
4k views

C-Shell : variable in variable

I want the value of variabe ${var}_err_num, but i can't do it. #!/bin/csh -f set list = "book bus apple" foeach var $list set err_num * * @err_num = $err_num + 1 set ${var}_err_num = $...
anyone's user avatar
  • 11
0 votes
1 answer
2k views

for loop logic porting from bash to csh

I have below code snippet working in bash: for i in `ps -eaf | grep -i <pattern> | awk '{print $3}'`; do kill -9 $i; done But I have a requirement to port this code to work in csh shell due to ...
dcds's user avatar
  • 1,002
0 votes
3 answers
7k views

How to change timezone in current shell session in Redhat

ls -lt shows time in PDT, I want to change it to Asia/Singapore in the current session. I tried set TZ=Asia/Singapore But it's showing the same time on ls -lt. How to do it?
Codeformer's user avatar
0 votes
1 answer
840 views

Advanced aliasing for csh shell [closed]

I want to create an alias for the nedit command but with the ability to add a .txt automatically to the passed argument. For example, when I would type n newfile --> it should execute --> nedit ...
Ashok Kumar Mishra's user avatar
0 votes
1 answer
7k views

How to change Bash to csh with username and password

I want to change bash to csh I'm using following command which is not working chsh -s /bin/csh insite(user) insite(password). I need to write shell script with this command this is the output i got ...
avinash's user avatar
  • 41
5 votes
3 answers
62k views

How to use while loop in csh shell command prompt?

I am trying to use while loop in csh shell command prompt in RHEL 7.2 but am getting the below error: $ while true while: Expression Syntax. The same is working in bash shell.
dcds's user avatar
  • 1,002

15 30 50 per page