1
在bash文件,我可以這樣寫:通多行數據管道Makefile中
my_program << EOF
Some test
More test
A lot of multi-line text
EOF
這將啓動MY-可執行文件,並通過管道傳三行文字(或更多)的給它。
現在我想在Makefile(GNU make)中這麼做。我發現沒有標準的解決方案,它是這樣解決的:
LaunchMyProgram:
echo -en "Some test\\nMore test\\nA lot of multi-line text\\n" | my_program
但是這看起來很醜。有更好的解決方案嗎?
我不知道這個問題應該在網站上。也許它的位置是在stackoverflow或超級用戶。 – Arenim