I'm not quite sure what you want, but this will extract a line containing "myloc" fromthe given file and source that line in the current shell:
. <(grep myloc ~spadmin/.profile)
You might want to note that aliases are, by default, expanded only in interactive shells. If you have scripts where you want to use any aliases, you would need to set the expand_aliases
option in each such script, and that is a fairly dangerous thing to do unless you can strictly limit the aliases that are in effect.