Reputation: 1765
Is there a cleaner/DRYer way to export multiple functions than how I am doing it here, just repeating the export -f
command over and over?
foo() {
echo "foo"
}
bar() {
echo "bar"
}
baz() {
echo "baz"
}
export -f foo
export -f bar
export -f baz
Upvotes: 4
Views: 1551
Reputation: 42017
export
takes multiple arguments. You can do:
export -f foo bar baz
Upvotes: 8