[exim] Re: Best way to split multiline string

Góra strony
Delete this message
Reply to this message
Autor: Evgeniy Berdnikov
Data:  
Dla: exim-users
Temat: [exim] Re: Best way to split multiline string
On Sat, Oct 12, 2024 at 12:36:33PM -0700, Ian Z via Exim-users wrote:
> I need to inspect the output from en external program (run via the
> ${run} expansion). The program outputs multiple lines, only the first
> is relevant to me. What is the least painful way to extract it? I mean
> the least number of backslashes and curlies.


Use ${run} to start shell wrapper with "head -1",
or simply feed 'command "$@" | head -1' line to shell.
--
Eugene Berdnikov

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/