David Coulson on 25 Aug 2011 11:52:33 -0700


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

Re: [PLUG] pushd and popd on debian squeeze


It is an internal bash command, so you can't use 'which' or 'find' on it, as there is no binary.


On 8/25/11 2:46 PM, Michael Lazin wrote:
yes, the script starts with #!/bin/bash

"which popd" reports nothing
"find -name popd" in the root directory shows nothing. 

It appears not to be on this box.
 

On Thu, Aug 25, 2011 at 2:40 PM, Douglas Muth <doug.muth@gmail.com> wrote:
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



--
Michael Lazin

to gar auto estin noein te kai ennai



___________________________________________________________________________
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
___________________________________________________________________________
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