help-make
[Top][All Lists]
Advanced

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

How to echo the output of a shell command and preserve the newlines


From: Ploppz
Subject: How to echo the output of a shell command and preserve the newlines
Date: Tue, 25 Aug 2015 10:28:35 -0700 (PDT)

Hi. I have this line:
        echo "$(shell ~/scripts/make/getshadernames src)" | sed 
's/\(.*\)/\textern
char const * const \1;/g' >> src/shaders.h

getshadernames prints out one name on each line. My problem is that what is
send to sed via the pipe, is only one long line - with newlines removed. How
can I fix that?

Thanks!



--
View this message in context: 
http://gnu-make.2324884.n4.nabble.com/How-to-echo-the-output-of-a-shell-command-and-preserve-the-newlines-tp16494.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]