in reply to Change Directory
Save the above program in a file (say dir-changer), make it executable and then type, from the command line:#!/usr/bin/perl chdir shift or die "Failed to chdir: $!"; exec "/usr/bin/sh" or die "Failed to exec /usr/bin/sh: $!"; __END__
The result ought to be a new shell, with new-directory as its current directory.exec ./dir-changer new-directory
|
|---|