![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regarding replace a part of a string | madhu_aqua14 | UNIX for Dummies Questions & Answers | 7 | 08-04-2008 11:07 AM |
| CUT command - cutting characters from end of string | JWilliams | AIX | 2 | 01-28-2008 09:12 AM |
| how to get the last part of a string followed by a pattern | bluemoon1 | Shell Programming and Scripting | 4 | 09-08-2007 12:10 PM |
| Finding part of a string | DAFNIX | Shell Programming and Scripting | 4 | 09-21-2006 12:24 AM |
| Cutting Up a String | lesstjm | Shell Programming and Scripting | 4 | 09-21-2004 12:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
It looks like your strings are paths to files (or directories). If this is always the case the easiest method is to use basename and dirname. eg:
$ dirname /u09/core/inbound/abc.txt /u09/core/inbound $ basename /u09/core/inbound/abc.txt abc.txt Basically these utilities split and give you everything before and after the last '/' in the string. If your strings are different please qualify. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|