Maximilian Bernöcker | 16 Sep 15:54 2008
Picon

[PATCH] added missing )

added missing ) in src/cd.c
---
 src/cd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/cd.c b/src/cd.c
index 624801d..3770664 100644
--- a/src/cd.c
+++ b/src/cd.c
 <at>  <at>  -258,7 +258,7  <at>  <at>  getpwd()
 #else
 	char buf[PATH_MAX];

-	if (getcwd(buf, sizeof(buf))
+	if (getcwd(buf, sizeof(buf)))
 		return savestr(buf);
 #endif

--

-- 
1.5.3.7

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Maximilian Bernöcker | 21 Sep 16:33 2008
Picon

dash, ash for loop oddity

Hi,

according to the grammar
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10_02>

| for_clause       : For name linebreak                            do_group
|                  | For name linebreak in          sequential_sep do_group
|                  | For name linebreak in wordlist sequential_sep do_group
| [...]
| linebreak        : newline_list
|                  | /* empty */

the following script should be legal:

#####
#!/bin/dash
for i
in a b c
do
echo $i
done
#####

but it fails with:

| ./a.sh: 3: Syntax error: "in" unexpected (expecting "do").

bash, zsh and NetBSDs ksh are doing fine while NetBSDs sh, based on ash
fails, too.

(Continue reading)


Gmane