perlperl
asked on
changing and restore working directory in bash
curr_dir=`pwd`
cd $dir
##
## Do some processing
##
cd $curr_dir
Is this inefficient way of restoring directory in bash script or is there some other standard way?
cd $dir
##
## Do some processing
##
cd $curr_dir
Is this inefficient way of restoring directory in bash script or is there some other standard way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
cd - worked. no need to save unnecessary working dir first
cd - worked. no need to save unnecessary working dir first
ASKER
Thanks