Terminal says 'syntax error' when opened (Solved)

Using applications, configuring, problems
Post Reply
Message
Author
passenger237
Posts: 19
Joined: Sat 03 Sep 2016, 04:24

Terminal says 'syntax error' when opened (Solved)

#1 Post by passenger237 »

Opening terminal yesterday, and today, I was greeted with the following two lines.

Code: Select all

bash: /etc/profile.d/qt4.csh: line10:syntax error near unexpected token '('
bash: /etc/profile.d/qt4.csh:line 10:              foreachqtd    ( /usr/lib'qt-* )' 
I'm running the lastest slacko64

So am wondering what the correct syntax is

thanks.
Last edited by passenger237 on Tue 07 Aug 2018, 00:40, edited 1 time in total.

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#2 Post by 6502coder »

The ".csh" extension strongly suggests that the "qt.csh" script is written to be run under the C-shell. As I recall, C-shell is one of the weirder variations of the UNIX/Linux shell, and I doubt that it is compatible with bash.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

I take it that passenger237 doesn't really mean that the terminal gave that error message immediately on starting the terminal, but rather, it gave the error message when he tried to run a .csh script or program from the terminal.

passenger237
Posts: 19
Joined: Sat 03 Sep 2016, 04:24

#4 Post by passenger237 »

When I open a terminal the two lines I posted above occupy the top of the terminal screen.

They also flash up during boot.

So I'd like to know why and what is the fix. please.

User avatar
gcav
Posts: 104
Joined: Fri 25 May 2012, 04:12
Location: Ontario

#5 Post by gcav »

The csh script got installed into profile.d and it is secured
as executable. So if a login term opens it executes all the stuff under
profile.d

remove the executable permission. or remove the file from the profile.d

you should have a qt4.sh in there though..

gc.

passenger237
Posts: 19
Joined: Sat 03 Sep 2016, 04:24

#6 Post by passenger237 »

gcav thank you.

Post Reply