I wrote this here-document to source a few scripts under the path
~/own_scripts/
but I wrote it in a way that causes duplication of this path:
source <<-EOF
~/own_scripts/1.sh
~/own_scripts/2.sh
# More scripts under ~/own_scripts;
EOF
Setting and later unsetting a variable with the path is nice but would still result in redundancy.
What's the best way to avoid path redundancy in such source
(or bash
) here-document?
Asked by Arcticooling
(1 rep)
Feb 3, 2018, 05:48 AM
Last activity: Feb 3, 2018, 09:05 AM
Last activity: Feb 3, 2018, 09:05 AM