Page 1 of 1

Terminal says 'syntax error' when opened (Solved)

Posted: Fri 27 Jul 2018, 02:03
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.

Posted: Fri 27 Jul 2018, 16:01
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.

Posted: Sat 28 Jul 2018, 00:56
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.

Posted: Wed 01 Aug 2018, 22:54
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.

Posted: Thu 02 Aug 2018, 01:01
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.

Posted: Tue 07 Aug 2018, 00:39
by passenger237
gcav thank you.