[Gllug] Why does this script not work?

Colin Murphy colin at ql4ever.demon.co.uk
Mon Dec 10 10:16:42 UTC 2001


I want a script that will change my current working directory to the 
path above, the same as 'cd ..'.


#!/bin/bash
pwd
cd ..
pwd

does what I would expect

[colin at second gllug]$ ../cdscript.sh
/home/colin/gllug
/home/colin

but doesn't 'set' the directory once the script exits.

How do I set my current directory to that set in the script.

-- 
Colin Murphy - colin at ql4ever.demon.co.uk
A man for all seasons, 'specially pepper.


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list