Hi,
I have the following bash script called push:
#!/bin/bash
pushd ()
{
dirname=$1
DIR_STACK="$dirname ${DIR_STACK:-$PWD' '}"
cd ${dirname:?"missing directory name."}
echo "$DIR_STACK"
}
If I source this script, and do 'pushd /etc', I get what I expect. I
also have this script called pushdir:
#!/bin/bash
pushd ()
{
dirname=$1
DIR_STACK="$dirname ${DIR_STACK:-$PWD}"
cd ${dirname:?"missing directory name."}
echo "$DIR_STACK"
}
pushd $1
If I do 'pushdir /etc', it echoes $DIR_STACK, but it doesn't cd to
/etc. What's wrong here? I'm running bash 1.14.7(1). Thanks,
Hidong
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list