.
.
.2022-01-31 10:49:37
bash
., 2022-01-31 10:49:37

Bash on sparc solaris 10 does not understand the for i in $( ls *_OWN.ldt ); do, why and what to do?

bash 4.3.33 on solaris 10 swears like this:

syntax error on line 133: `$' unexpected


while bash 4.2.46 on redhat normally understands this command.
It's not clear what's wrong.
Can anyone clarify why bash behaves so strangely in diesel fuel, and where can I read about it?
And are there any online tools where you can repeat such a mistake?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2022-01-31
@karabanov

$(ls ldt/*_OWN.ldt);- more visual, of course, but there may be special effects depending on the shell used.
`ls ldt/*_OWN.ldt`- with apostrophes is less clear, but will work almost everywhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question