[ale] SHELL: get file name

Zyman, Andy zymana at hra.nyc.gov
Tue Jul 2 12:59:38 EDT 2002


what a shame :(((
thank You Chris!!


> -----Original Message-----
> From: Chris Coleman [mailto:chriscoleman at mail.clayton.edu]
> Sent: Tuesday, July 02, 2002 12:59 PM
> To: Zyman, Andy
> Cc: ale at ale.org
> Subject: RE: [ale] SHELL: get file name
> 
> 
> ABSFILE=/home/aaa/bbb/ddd/name.log
> file=$(basename $ABSFILE)
> echo $file
> 
> Chris Coleman,
> Instructor
> School of Technology
> Clayton College and State University
> Phone: 770-960-4282
> 
> 
> 
> -----Original Message-----
> From: Zyman, Andy [mailto:zymana at hra.nyc.gov]
> Sent: Tuesday, July 02, 2002 12:54 PM
> To: 'ale at ale.org'
> Subject: [ale] SHELL: get file name
> 
> 
> 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.
> 

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