![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| mv Filename variable to another filename | gzs553 | Shell Programming and Scripting | 3 | 04-14-2008 04:19 PM |
| Report of duplicate files based on part of the filename | sudheshnaiyer | UNIX for Dummies Questions & Answers | 1 | 12-18-2007 04:31 PM |
| shortcut for tar cvf - [filename] | gzip > [filename].tar.gz | bcamp1973 | UNIX for Dummies Questions & Answers | 4 | 12-11-2007 05:45 PM |
| read a part of filename from the list in the script | happyv | Shell Programming and Scripting | 3 | 10-20-2006 09:58 AM |
| Wanted to eliminate numeric part from a filename | Sona | UNIX for Dummies Questions & Answers | 8 | 07-20-2006 02:49 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
part of a filename
Hi,
I need to extract only a part of the filenames of some files. The files are named this way : Code:
.tap_profile_SIT02 Code:
find .tap_profile_* | grep -o "[A-Z]\{3\}[0-9]\{2\}$"
|
|
||||
|
Code:
find .tap_profile_* .tap_profile_DEV07 .tap_profile_DEV07_6.2.1.0 .tap_profile_DEV08 .tap_profile_GFER1 .tap_profile_SIT02 Code:
find .tap_profile_* | sed 's/.*_\(.*\)/\1/' DEV07 6.2.1.0 DEV08 GFER1 SIT02 @bobbygsk I tried your modification, but the result I get aren't the same. It matches a lot more files |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|