Say I login using bash and I define an alias.
$ alias c=clear
$ echo $0
bash
Now I enter dash.
$ dash
$ echo $0
dash
The alias defined in bash isn't available:
$ alias
$
How do I access it? More generally how do I access stuff in memory from the child process?
To be more precise, what I mean with "access" is being able to get the same data that I get when I run alias
in the parent process.
bash
. – Apr 10 '19 at 15:33/proc/self/mem
are you? – Philip Couling Apr 10 '19 at 16:10foo(){ echo foo; }; export -f foo; bash -c 'foo'
– Apr 10 '19 at 16:11