Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Remove dates from file names

Shell Programming and Scripting


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 1 Week Ago
shivamayam shivamayam is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 18 July 2017, 4:18 AM EDT
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Remove dates from file names

Hi,

I'm using a shell script. I have extracted current date files to a directory1 and the date should be removed on both sides of a CSV file.

FYI... I'm looking to remove the date from the file name and not inside the CSV file.

Directory1


Code:
2017-07-12_gmr_tag_log_20170711.csv
2017-07-12_gmr_call_log_20170711.csv
2017-07-12_gmr_outgoing_log_20170711.csv

Final output Directory2:


Code:
gmr_tag_log.csv
gmr_call_log.csv
gmr_outgoing_log.csv

Moderator's Comments:
Remove dates from file names Opened a new thread for this question. Please do not hijack other threads but open your own in future..

Last edited by Scrutinizer; 1 Week Ago at 05:01 PM.. Reason: code tags
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Get all the files from a FTP location with previous week's dates in the file names using Linux dhruuv369 Linux 2 09-11-2013 02:04 PM
How to get the dates from a list of file names? dsfreddie Shell Programming and Scripting 6 06-30-2012 03:50 PM
Remove special character ($) from file names competitions Shell Programming and Scripting 6 06-03-2011 08:56 AM
Remove spaces between file names srimitta Shell Programming and Scripting 10 03-30-2009 07:16 AM
how to remove files with only numbers as file names? praveen_indramo Shell Programming and Scripting 6 06-07-2007 09:13 AM



All times are GMT -4. The time now is 08:40 PM.