UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 2nd, 2003, 02:23 PM
faubertr faubertr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Stamford, CT
Posts: 5 faubertr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unix Directory

Hi,

Unix -Hp
In my Korn Shell script my argument is : /HomeDirectory/reports/filename.ps

How can I extract from this argument only the directory without filename and extension ?


Thanks,

Last edited by faubertr : June 3rd, 2003 at 07:25 AM.

Reply With Quote
  #2  
Old June 3rd, 2003, 12:58 AM
Narek Narek is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Yerevan, Armenia
Posts: 224 Narek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 1 m 30 sec
Reputation Power: 6
Send a message via ICQ to Narek
A bit more specific please. What language are you using?

Reply With Quote
  #3  
Old June 3rd, 2003, 09:51 AM
zakj zakj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 52 zakj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 41 sec
Reputation Power: 6
Read the man page for basename(1).

Reply With Quote
  #4  
Old June 3rd, 2003, 11:24 AM
faubertr faubertr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Stamford, CT
Posts: 5 faubertr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb Unix -Hp Directory.

Thanks for the help and the answer is :

NAME=$(dirname /home/faubertr/reports/text.ps)

faubertr:/home/faubertr>echo $NAME
/home/faubertr/reports


not exactly what's showing in examples from the man page.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Unix Directory


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway