🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by David Elliott Tue, 14 Nov 1989 16:02
"for i" broken?
#711
Author: David Elliott
Date: Tue, 14 Nov 1989 16:02
31 lines
1170 bytes
It appears that the "for" construct in which no "in {list}" is
given does not appear to work.  (For those of you unfamiliar
with this construct, it imples "in {list of arguments}".)

	Script started on Tue Nov 14 07:58:30 1989
	icky 1>cat ft
	#!/mnt/dce/Src/bash-1.04/bash

	PATH=/bin:/usr/bin

	for i
	{
		echo "$i"
	}
	icky 2>./ft
	syntax error near `{'
	./ft:6: `{'

	syntax error near `}'
	./ft:8: `}'
	icky 3>
	script done on Tue Nov 14 07:58:41 1989

As a side question, Brian, are you collecting shell scripts to be
used as a regression/porting test suite with bash, like those which
come with gawk and perl?
-- 
David Elliott
dce@sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"You can lead a robot to water, but you can not make him compute."
"for i" broken?
#717
Author: Brian Fox
Date: Tue, 14 Nov 1989 23:05
35 lines
1450 bytes
   Date: 14 Nov 89 16:02:53 GMT
   From: dce@sony.com  (David Elliott)
   Organization: Sony Microsystems Corp.
   Sender: bug-bash-request@prep.ai.mit.edu

   It appears that the "for" construct in which no "in {list}" is
   given does not appear to work.  (For those of you unfamiliar
   with this construct, it imples "in {list of arguments}".)

Well, this is not exactly true.

	for i; do echo $i; done

works correctly.  Only in the "{}" style of the command does this not
work.

	   for i
	   {
		   echo "$i"
	   }
	   syntax error near `}'

   As a side question, Brian, are you collecting shell scripts to be
   used as a regression/porting test suite with bash, like those which
   come with gawk and perl?

Oh yes!  Good idea.  Go ahead and submit such scripts to:

	bash-scripts@aurel.cns.caltech.edu

If you mail them directly to me, I may accidentally delete them, which
would be a shame.

Brian Fox
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads