tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Implement dash as bootstrap shell



Not a dash user, I notice on https://wiki.ubuntu.com/DashAsBinSh the following mention:
> declare or typeset
> 
> The 'declare' or 'typeset' warning from the checkbashisms script.
> 
> The declare or typeset builtins in bash (they are exact synonyms) permit restricting the properties of variables. For example, you can declare a variable to be an integer type variable by using -i.
> 
> Both 'declare' and 'typeset' are not supported in dash. When changing from using declare/typeset, you normally could switch declare/typeset with local and continue as before. 
...
> $LINENO
> 
> POSIX requires that conforming shells expand the special parameter $LINENO to the current line number in a script or function; dash does not yet support this feature.
...
> `dash` doesn't expand `~` on path search
> 
> This means that if you have ~/bin in the PATH environment variable, bash finds commands located in ~/bin, while dash doesn't.
> 

Are these still the case and will going to dash therefore complicate debugging scripts?

Most of the shells used today support 'typeset' but not necessarily 'local'... dash seems to support only the latter and not the former.

Can they be 'fixed' prior to switching?


-- 
Richard PALO



Home | Main Index | Thread Index | Old Index