From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653646721586.tru64-unix-managers.marc@archive.invalid> From: George Gallen Date: Wed, 18 Apr 2001 19:00:51 +0000 To: tru64-unix-managers Subject: trying to get a script to change directories.... X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653646721586 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_001_01C0C839.E786DB20" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0C839.E786DB20 Content-Type: text/plain; charset="iso-8859-1" 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@slackinc.com ph:856.848.1000 Ext 220 SLACK Incorporated - An innovative information, education and management company http://www.slackinc.com ------_=_NextPart_001_01C0C839.E786DB20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable trying to get a script to change directories....

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@slackinc.com
ph:856.848.1000 Ext 220

SLACK = Incorporated - An innovative information, education and management = company
http://www.slackinc.com

------_=_NextPart_001_01C0C839.E786DB20--