| ||||||||||||
| ||||||||||||
pushd and popd
On every programming course, you're taught never to use the goto statement even if the language has one available, as you're creating spaghetti code that's hard to follow and maintain. I agree with the sentiment.
So .... why, oh why, .... when you're navigating around directories at a command prompt do you use the cd command - it's the shell's equivalent of directory goto as it leaves you jumping away from your current directory, and not leaving a return address for when you want to go back. Have you come across pushd and popd? When you "pushd" to a directory, you save away on a stack the name of the directory you're moving from; when you "popd" you return. Simple, effective, ang great when you want to pay a temporary visit to a remote directory in a Unix or Linux shell. P.S. They're supported in Microsoft's Windows XP too! (written 2004-10-05 06:54:00)
Associated topics are indexed under A101 - Web Application Deployment - Linux -An Introduction For Users
Some other Articles
Domain Registry of AmericaTelephone systems Learning to program in It's just not cricket pushd and popd vi - full circle On Customer Service Comparators in Linux and Unix Red Luas - early life and times John Toner 1637 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| |||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | ||||||||||||