trying to get a script to change directories....

From: George Gallen <ggallen_at_slackinc.com>
Date: Wed, 18 Apr 2001 15:00:51 -0400

What I'm doing is I want to execute a script which will cd me
to the latest syslog files.

I'm using the following:

cd /var/adm/syslog.dated/`ls -t /var/adm/syslog.dated | head -n 1`

If I type it directly, it works, however if I run it as a script, I'm sure
the script pid changes directories, but when it ends, I'm back where
I was.

How do I run the script without forking off a new PID?

Thanks
George


George Gallen
Senior Programmer/Analyst
Accounting/Data Division
ggallen_at_slackinc.com
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management
company
http://www.slackinc.com
Received on Wed Apr 18 2001 - 19:01:43 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT