[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Shell: dir name
- Subject: [ale] Shell: dir name
- From: zymana at hra.nyc.gov (Zyman, Andy)
- Date: Tue, 21 May 2002 09:32:53 -0400
Hello,
i have simple question. but i somehow stuck on it.
I need to find out from which dir. the scripts was executed.
here is an example:
cat /tmp/staff/script.sh
#!/bin/ksh
SPOOL_FILE=$PWD/log/spool_file.log
echo $SPOOL_FILE
#END
After "manual" executing , the output is:
/tmp/staff/log/spool_file.log
this was working perfectly well until i cronned it.
now in the output i basically have :
$HOME/log/spool_file.log
I thought there is an env. var which will point to the dir. The only one
thing i found is $_. But it returns ( in case of ksh ) the whole
path/script_name. And i just need dir. Any help?
Thank You
Andy
office: 212 849 3543
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.