Sponsored Content
Top Forums Shell Programming and Scripting Shell script to get one to one map and rename the filename Post 302842615 by iaav on Friday 9th of August 2013 02:37:05 PM
Old 08-09-2013
Shell script to get one to one map and rename the filename

I have 2 files sorted by numerically. I need help with shell script to read these 2 files and do a 1:1 mapping and rename the filenames with the mapped case#;

For example:

Code:
cat case.txt
10_80
10_90

cat files.txt
A BCD_x 1.pdf
A BCD_x 2.pdf

ls pdf_dir
A BCD_x 1.pdf A BCD_x 2.pdf

Read these 2 txt and rename the pdf files in pdf_dir :
A BCD_x 1.pdf as A BCD_10_80.pdf
A BCD_x 1.pdf as A BCD_10_90.pdf


Last edited by iaav; 08-09-2013 at 03:52 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

How to map a disk block to filename/ Inode

Hi, I want to find out a particular disk block belong to which file. in solaris 2.8 Can anyone help. Thanks and Regards Bala (1 Reply)
Discussion started by: Balamurugan
1 Replies

2. Shell Programming and Scripting

Shell script to map XML nodes

Hi folks, I'm a bit of a novice at this but here goes. I want to read in nodes from an XML file, and map the path to each. eg the file is structured <node><nodename>.</nodename> <node><nodename>topnode</nodename> <node><nodename>subnode1</nodename></node> ... (1 Reply)
Discussion started by: mark14
1 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

Shell Script to rename files

Hi, i need a bit of help writting a tcsh script which renames all ascii text files in the current directory by adding a number to their names before the extension so for example, a directory containing the files Hello.txt Hello.t Hello should have the following changes, Hello.txt... (2 Replies)
Discussion started by: yakuzaa
2 Replies

5. Shell Programming and Scripting

Grep and rename the filename

Hi All, Can you please help me. The situation is like this. There are many different file name in this directory. I have to grep all the file that the name start with "PTWO" and rename it to COM with the current date. This is the script that I have done and it hit an... (16 Replies)
Discussion started by: badbunny9316
16 Replies

6. Shell Programming and Scripting

how to rename all files that have a certain text in the filename using tcsh shell

Hello~ I'm on AIX version 5 and I believe I have the tcsh shell environment to play in. Can you guys help me with a solution to rename all files that have "eclp" in the filename to "ecl" ? I basically want to rename the files and strip the "p" out. i.e. original filenames: ... (3 Replies)
Discussion started by: in2vtec
3 Replies

7. Shell Programming and Scripting

How do I rename a filename in a directory?

Hi, I've got a large to task to do, which I've broken into three section. I'm just stuck on one of the sections. I have to change the end of a filename from .txt to .doc in a directory. So if I have a directory called "folder1" and two files contained in it called "file1.txt" and "file2.txt",... (7 Replies)
Discussion started by: TeddyP
7 Replies

8. UNIX for Dummies Questions & Answers

rename filename

Hi, I am pretty new to this. I have a condition where in I want to replace all files within a folder. All filenames with character "abc" would need to replaced with "xyz". eg: helloabcworld-->helloxyzworld helloworld-->helloworld ... ... Thanks in advance. (6 Replies)
Discussion started by: sakets_2000
6 Replies

9. Shell Programming and Scripting

Rename FileName in the Directory

In the Directory all the Files are following format. Filename_yyyymmdd_numbers.txt eg. file_name_20120106_015802.txt . I want to write the Shell script to rename all the file to file_name.txt.in the directory. Thanks Mani (5 Replies)
Discussion started by: gavemani
5 Replies

10. Shell Programming and Scripting

Array or map Concept in Shell Script

Need a urgent help I have a data like below 044 CN CNP 032 MB MBD 567 NH NHI 678 GY GYP . . . . 250 records above data are loaded from a table ... I have a shell script which will read each line and in a specific position it has extn code like ... 044 or 032 ... i need... (3 Replies)
Discussion started by: greenworld123
3 Replies
Image::ExifTool::MXF(3pm)				User Contributed Perl Documentation				 Image::ExifTool::MXF(3pm)

NAME
Image::ExifTool::MXF - Read MXF meta information SYNOPSIS
This module is used by Image::ExifTool DESCRIPTION
This module contains definitions required by Image::ExifTool to read meta information from MXF (Material Exchange Format) files. AUTHOR
Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca) This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. REFERENCES
<http://sourceforge.net/projects/mxflib/> <http://www.aafassociation.org/downloads/whitepapers/MXFPhysicalview.pdf> <http://archive.nlm.nih.gov/pubs/pearson/MJ2_Metadata2005.pdf> http://www.aafassociation.org/downloads/specifications/AMWA-AS-03-Delivery-Spec-1_0.pdf <http://www.aafassociation.org/downloads/specifications/AMWA-AS-03-Delivery-Spec-1_0.pdf> http://paul-sampson.ca/private/s385m.pdf <http://paul-sampson.ca/private/s385m.pdf> <http://avwiki.nl/documents/eg41.pdf> <http://avwiki.nl/documents/eg42.pdf> http://www.amwa.tv/downloads/specifications/aafobjectspec-v1.1.pdf <http://www.amwa.tv/downloads/specifications/aafobjectspec-v1.1.pdf> http://www.smpte-ra.org/mdd/RP210v12-publication-20100623.xls <http://www.smpte-ra.org/mdd/RP210v12-publication-20100623.xls> http://rhea.tele.ucl.ac.be:8081/Plone/Members/egoray/thesaurus-dictionnaire-metadata/ <http://rhea.tele.ucl.ac.be:8081/Plone/Members/egoray/thesaurus-dictionnaire-metadata/> http://www.mog-solutions.com/img_upload/PDF/XML%20Schema%20for%20MXF%20Metadata.pdf <http://www.mog- solutions.com/img_upload/PDF/XML%20Schema%20for%20MXF%20Metadata.pdf> <http://www.freemxf.org/freemxf_board/viewtopic.php?p=545&sid=00a5c17e07d828c1e93ecdbaed3076f7> SEE ALSO
"MXF Tags" in Image::ExifTool::TagNames, Image::ExifTool(3pm) perl v5.12.4 2011-01-25 Image::ExifTool::MXF(3pm)
All times are GMT -4. The time now is 06:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy