Created attachment 226792 [details] for execution in csh User with default shell csh. $ uname -a FreeBSD freebsd 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 Running the loop in csh results in prompt: $ touch file1.dat file2.dat $ foreach i (*.dat) ; echo $i ; end foreach?
Both foreach and end must appear alone on separate lines.
Created attachment 226808 [details] csh sript to list .dat files on current dir
Using a script works.