Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
a3_nm
on Nov 25, 2013
|
parent
|
context
|
favorite
| on:
Bash Pitfalls
You can use sed's external command mechanism to do that. This replaces lines of the form "include foo.txt" with the contents of foo.txt.
sed 's/^include \(.*\)/cat "\1"/e'
comex
on Nov 25, 2013
[–]
Sounds useful, but it's not portable, and doesn't work on OS X. I suppose I could just switch to GNU sed, since I mostly care about interactive use, but thus far I haven't done so.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: