>    First problem: If you are assigning a string to a variable,
> you need to put quotes around the string.  That shows that "-p"
> doesn't insert newlines:
> 
>  > x="$'foo\nbar'"
>  > declare -p x
>  declare -- x="\$'foo\\nbar'"
You do not have any newlines in that string, so of course the
demonstration with -p will show no newlines.

>> What are you trying to do? 
> Read var & func defs via a 'read' of 1 line.

In your variable "x" above, you have encoded the string in a format
which contains no raw newlines and which can be "eval"ed to produce the
original contents.
Why don't you encode the function the same way?


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to