[ale] SHELL: get file name

Geoffrey esoteric at 3times25.net
Tue Jul 2 13:39:44 EDT 2002


Zyman, Andy wrote
> 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

echo ${ABSFILE##*/}

> 
> 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.
> 
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
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.






More information about the Ale mailing list