[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: export won't work

"Eric G. Miller" wrote:
> On Sun, Sep 01, 2002 at 07:04:07PM +1000, Russell wrote:
> > Hi,
> >
> > Why won't export work? When i run this
> > bash script on debian 3:
> >
> > #!/bin/sh
> > ABC=def
> > export ABC
> > exit 0
> >
> > when i type 'export', then ABC doesn't
> > appear in the list of environment variables.
> A process can't change the environment of it's parent.  What are you
> trying to do?

I'm modifying a crappy script i made for copying everything
on the main HDD to another HDD on /mnt, to make a backup.
Some directories need to be skipped like /proc, /mnt, etc,
but i still want to copy the top level directory names.

Is there a command to copy say /cdrom with the attributes
preserved but without copying any contents?

I didn't realize that 'source' and just running/executing
the script were handled differently (i think i knew a couple
of years ago; i'll have to read the whole bash book again;)
I'm persisting also just to relearn bash, because it's
useful to know when i do some more C programming projects.

Reply to: