The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
gzcat into awk and then change FILENAME and process new FILENAME timj123 Shell Programming and Scripting 6 06-23-2008 08:45 AM
part of a filename flame_eagle Shell Programming and Scripting 8 02-28-2008 11:18 AM
Report of duplicate files based on part of the filename sudheshnaiyer UNIX for Dummies Questions & Answers 1 12-18-2007 04:31 PM
read a part of filename from the list in the script happyv Shell Programming and Scripting 3 10-20-2006 10:58 AM
Wanted to eliminate numeric part from a filename Sona UNIX for Dummies Questions & Answers 8 07-20-2006 03:49 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-17-2008
mainegate mainegate is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
detecting the part of a filename

I like to have the date in the 2008-09-01 format at the beginning of my filenames. I then hyphenate after that and then have my filename.

I have a script that creates this for me. However, I may be working on files that already have the date format already in there and so I don't want to have a date twice. Is there a way to detect number or something at the beginning of the filename and if so then cut out the date?
 

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0