Hello Nico,

i have tried to to remove the " -f - " from the awk call.
result: awk was printing the programm to the file instead of executing them.

So i don't change this.
( -f - makes clear that the programm is comming from stdin and the next
argument is the text file to be processed with the programm)

All other comments (ll and so one) are now corrected ...








2014-03-26 10:51 GMT+01:00 Nico Schottelius <notifications@github.com>:

> In cdist/conf/type/__key_value/files/remote_script.sh:
>
> > +   || echo "__CDIST_NOTSET__")"
> > +if [ -f "$__object/parameter/exact_delimiter" ]; then
> > +    export exact_delimiter=1
> > +else
> > +    export exact_delimiter=0
> > +fi
> > +
> > +tmpfile=$(mktemp "${file}.cdist.XXXXXXXXXX")
> > +# preserve ownership and permissions by copying existing file over tmpfile
> > +if [ -f "$file" ]; then
> > +    cp -p "$file" "$tmpfile"
> > +else
> > +    touch "$file"
> > +fi
> > +awk -f - "$file" >"$tmpfile" <<"AWK_EOF"
> > +BEGIN {
>
> It seems like I am getting the way the new implementation works and find a
> small nuance that could be made more elegant: awk by default reads the code
> as the next argument - so the here document and -f - are actually just
> added without providing any feature -> you could probably replace them with
> single quotes.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/telmich/cdist/pull/317/files#r10969601>
> .
>