[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] SHELL: get file name
- Subject: [ale] SHELL: get file name
- From: zymana at hra.nyc.gov (Zyman, Andy)
- Date: Tue, 2 Jul 2002 12:54:11 -0400
Hello,
Some time ago i had the question "how to get dirname". Now i decided to go
even further :) and get filename.
So here we go:
ABSFILE=/home/aaa/bbb/ddd/name.log
question:
how can i get "name.log"?
I need to be flexible on the location - cann't hardcoded location.
I want to achive this in one step.
Right now i'm doing :
dirn=`dirname $ABSFILE`
echo $ABSFILE | sed 's/\'$ABSFILE'//g'
Thank You
Andy
---
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.