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

Re: config files - newline possible?



Hi Tomas,

in my case it is the config freom from bootcdwrite, which is bootcdwrite.conf.

The parm is NOT_TO_CD and as there are many and partly long pathnames, the 
line has increased rather long. So I want to shorten it.

But as it was said: there is no general way for this. So I just try some 
things out for this, and the next time again.

Thought I have something missed, but does not look so.

Thanks for all the help, I think this case caqn be closed. I will wait for one 
or two days and then mark this case as closed.

Cheers

Hans

> As Nicolas George says, "config-file" is too generic a term.
> If the above is a variable assignment, then you can escape the
> newlines with a backslash, like so
> 
> Do_not_write="path1/subfolder \
>   path1/subfolder2 \
>   ..."
> 
> Note that the backslash has to be the last character in the
> line. No extra whitespace after that (this is somewhat
> fragile). I prefer to put such things in here docs:
> 
> read -d '' Do_not_write <<"__END"
> this
> that
> the other
> __END
> 
> echo "Do_not_write"
> =>
> this
> that
> the other
> 
> Put attention to the quotes. In bash, type "help read" to learn
> about the options (it is a builtin, it has to).
> 
> Cheers





Reply to: