Re: [OT] bash help

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

 



On Sun, 19 Feb 2017 05:22:44 -0800
Mike Wright <nobody@xxxxxxxxxxxxxxxxxxxx> wrote:

> Hi all,
> 
> My brain cell ran away from home.  I have an incredibly simple script 
> that doesn't do what I expect.  I use "mkdir DIR; cd DIR" a lot so I'm 
> trying to put it in a script: "~/bin/mdcd".
> 
> After checking that $1 exists:
> 
> dir="$1"
> mkdir -p "$dir"
> cd "$dir"   <------ never executes
> 
> The directory is created so there is no error there.
> 
> Huh? Insight anyone?
> 
> Thanks,
> Mike Wright
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx


Hi

not sure about that but I think the "cd" command executes indeed 
but it's valid only for the scripts' environment and not for the 
shell you started the script from.

If it's not so, may be my brain cells are gone too.

Ciao
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux