str=${2:-"null"}

Hi !

what is the meaning of expession inside brackets ?
str=${2:-"null"}
columns are separator ? are in brackets 2 values?..
How about this expression ?
str=${name:=1}
(without - )

Thank you very much.
Jenea Ciur [ Fr, 01 Februar 2008 17:54 ] [ ID #1921516 ]

Re: str=${2:-"null"}

On Fri, 1 Feb 2008 08:54:23 -0800 (PST), Ciur Eugen wrote:
> what is the meaning of expession inside brackets ?
> str=${2:-"null"}
> columns are separator ? are in brackets 2 values?..
> How about this expression ?
> str=${name:=1}
> (without - )

man sh | less +/:-

--
Stephane
Stephane CHAZELAS [ Fr, 01 Februar 2008 18:01 ] [ ID #1921517 ]

Re: str=${2:-"null"}

On Feb 1, 7:01=A0pm, Stephane Chazelas <stephane_chaze... [at] yahoo.fr>
wrote:
> On Fri, 1 Feb 2008 08:54:23 -0800 (PST), Ciur Eugen wrote:
> > what is the meaning of expession inside brackets ?
> > str=3D${2:-"null"}
> > columns are separator ? are in brackets 2 values?..
> > How about this expression ?
> > str=3D${name:=3D1}
> > (without - )
>
> man sh | less +/:-
>
> --
> Stephane

wow, cool.
Thank you !
Jenea Ciur [ Fr, 01 Februar 2008 18:15 ] [ ID #1921519 ]
Linux » comp.unix.shell » str=${2:-"null"}

Vorheriges Thema: I want to open a bunch of ssh sessions, how to script it?
Nächstes Thema: unix,cobl, sap,.net brief description