Bug 257497

Summary: csh does not execute for loop
Product: Base System Reporter: bugzeo <kiboto6933>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Description Flags
for execution in csh
csh sript to list .dat files on current dir none

Description bugzeo 2021-07-30 02:42:41 UTC
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
Comment 1 Andriy Gapon freebsd_committer 2021-07-30 06:28:50 UTC
Both foreach and end must appear alone on separate lines.
Comment 2 bugzeo 2021-07-30 20:37:56 UTC
Created attachment 226808 [details]
csh sript to list .dat files on current dir
Comment 3 bugzeo 2021-07-30 20:38:08 UTC
Using a script works.