Janis Papanagnou:
[ snip ]
where shell program sh_level is
$ cat sh_level
printf "'%s'\n" "${.sh.level}"
(( $1> 0 ))&& . ./sh_level $(( $1 - 1 ))
# Version JM 93t+ 2009-05-01
Under what condition will you get a "0" ?
Hi Janis,
At the prompt level:
$ . ./sh_level
'0'
-ksh: .: line 2: > 0 : arithmetic syntax error
$ print ${.sh.version}
Version JM 93u+ 2011-06-21
Cheers,
Henk
Date: Sat, 17 Dec 2011 01:23:10 +0100
From: [email protected]
[...]
.sh.level == 0 indicates an interactive shell
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users