[exim] Re: Best way to split multiline string

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ian Z via Exim-users
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] Re: Best way to split multiline string
On Sun, Oct 13, 2024 at 11:51:31AM GMT, Evgeniy Berdnikov 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.


This is what I came up with, myself. Thanks :-)

--
Ian

--
## 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/