Sponsored Content
Top Forums Shell Programming and Scripting Remove timestamp from multiple filename Post 302506574 by vaas on Monday 21st of March 2011 08:45:30 AM
Old 03-21-2011
Remove timestamp from multiple filename

could you pls help me out in PERL

i have a requirement like
Code:
a.dat.<timestamp> 
b.dat.<timestamp> 
c.dat.<timestamp>

can you pls help me to rename/remove timestamp

Code:
a.dat 
b.dat 
c.dat

Is there any way to remove timestamp alone
Thanks

Moderator's Comments:
Mod Comment Please use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. Also refrain from overly use of fonts formattings, as they such posts are a bit awful to edit, thanks Smilie

Last edited by zaxxon; 03-21-2011 at 09:51 AM.. Reason: font formattings, code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to add a timestamp to a filename?

whats going on guys. below is a script i made and am just curious if there is a "time stamp" command. so i can set the timestamp in a filename. #! /bin/ksh # # This scripts takes a list of files in the INDIR variable and compairs it to a list of files that are open in the same directory.... (2 Replies)
Discussion started by: Optimus_P
2 Replies

2. Shell Programming and Scripting

add timestamp to filename

Does anyone know how to add a timestamp to a file's name extension in a shell script? Please help.. (3 Replies)
Discussion started by: walterja
3 Replies

3. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

i have several thousand files and in subdirs that are named file.46634.txt budget.75346.pdf etc i want to remove the number but retain the extension. it is always a 5 digit. thanks. (6 Replies)
Discussion started by: jason7
6 Replies

4. Shell Programming and Scripting

Timestamp in the filename

Hi i want to replace the previous time stamp with the current timsatp at the start of the file like 20090710_113354_FT0710a.txt this one to 20091111__113354_FT0710a.txt thanks in advance (3 Replies)
Discussion started by: Reddy482
3 Replies

5. Shell Programming and Scripting

How to extract timestamp from the filename?

Hi., My file name is of the format: name_abc_20100531_142528.txt where., my timestamp is of the format: yyyymmdd_hhmmss How to extract the date strring and time string into seperate variables in the shell script, after reading the file as the input? I want to get the variables... (9 Replies)
Discussion started by: av_vinay
9 Replies

6. Shell Programming and Scripting

Extract date from filename and set timestamp

I have lots of files in this format: dvgrab-2003.06.29_15-30-24.mpg The numbers represents the date and time (YYYY.MM.DD_HH-MM-SS) How can I extract the dates from the filenames, and use the dates in the file timestamp? I guess this can be done by using "find", "sed" and "touch"? Can... (6 Replies)
Discussion started by: qwerty1234
6 Replies

7. Shell Programming and Scripting

Get filename with size and timestamp

Hi, Below is a directory containing links new2,list,new1. I need to get the size and timestamp for them. How do i get these details. Please help lrwxrwxrwx 1 xxx abc 11 Nov 24 17:34 new2 -> ./org1/new2 lrwxrwxrwx 1 xxx abc 11 Nov 24 17:34 list -> ./org2/list lrwxrwxrwx 1 xxx abc 10... (2 Replies)
Discussion started by: pradebban
2 Replies

8. Shell Programming and Scripting

Filename timestamp

Hi Gurus, I have different files with different timestamp and different base file name, I have to group those files based on basename and provide a unique file name for similar file names. My Directory has following files. abc_filename_20130623:00:09:00.txt... (1 Reply)
Discussion started by: user_linux
1 Replies

9. Shell Programming and Scripting

How to sort the timestamp in the filename in shell script?

originally the shellscript #ln_file_name=`echo $ld_interface_date"_"${8}".csv"` #ln_file_name=`echo 201202011527_HL_HLTM1_B04A.csv` ln_file_name="*"`echo ${7}".csv"` get_file_list_1=$log_path"tm1_file_list.gfl1" cd ${source_path} echo "Try to find any file exist in the... (10 Replies)
Discussion started by: feilhk
10 Replies

10. Shell Programming and Scripting

How can i make my cron/script to generate a log filename with timestamp in it ?

Hello Friends, I would like my script to display date timestamps in the file name for every script execution. Below is the scenario: (just for testing purpose) I scheduled a cron job, lets say it runs every 5 min and record/logs output in to a log file. 0,5,10,15,20,25,30,35,40,45,50,55 *... (5 Replies)
Discussion started by: System Admin 77
5 Replies
load_datafile(3alleg4)						  Allegro manual					    load_datafile(3alleg4)

NAME
load_datafile - Loads a datafile into memory. Allegro game programming library. SYNOPSIS
#include <allegro.h> DATAFILE *load_datafile(const char *filename); DESCRIPTION
Loads a datafile into memory in one go. If the datafile has been encrypted, you must first call packfile_password() to set the appropriate key. If the datafile contains truecolor graphics, you must set the video mode or call set_color_conversion() before loading it. Example: /* Load the resources for our game. */ DATAFILE *dat = load_datafile("game.dat"); if (!dat) abort_on_error("Couldn't load sound resources!"); /* Use resources. */ ... /* Destroy them when we don't need them any more. */ unload_datafile(dat); RETURN VALUE
Returns a pointer to the DATAFILE, or NULL on error. Remember to free this DATAFILE later to avoid memory leaks. SEE ALSO
load_datafile_callback(3alleg4), unload_datafile(3alleg4), load_datafile_object(3alleg4), set_color_conversion(3alleg4), fixup_datafile(3alleg4), packfile_password(3alleg4), find_datafile_object(3alleg4), register_datafile_object(3alleg4), excustom(3alleg4), exdata(3alleg4), exexedat(3alleg4), exgui(3alleg4), exsprite(3alleg4), exunicod(3alleg4) Allegro version 4.4.2 load_datafile(3alleg4)
All times are GMT -4. The time now is 11:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy