Douglas Muth on 25 Aug 2011 11:40:50 -0700


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

Re: [PLUG] pushd and popd on debian squeeze


On Thu, Aug 25, 2011 at 2:35 PM, Michael Lazin <microlaser@gmail.com> wrote:
> Hi, I am trying to run a bash script on debian squeeze that uses pushd and
> popd.  They are not in the path and when I got to the root directory as root
> and type "find -name pushd" nothing comes up.  Why are these missing from
> debian?  How can I get them?

They're shell commands.  Make sure your script starts with:

#!/bin/bash

and NOT:

#!/bin/sh

While sh is usually symlinked to bash, if it's run as sh, it will
emulate the Bourne Shell, and bash-specific commands like pushd and
popd will not be available.

-- Doug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug