Sponsored Content
Top Forums Shell Programming and Scripting removing a word in a multiple file starting at the dot extension Post 302549709 by jao_madn on Tuesday 23rd of August 2011 07:09:35 PM
Old 08-23-2011
Thanks very much for a helpful response

By the way i solve my problem by using this single command below

Quote:
#rename -n 's/^(.*)-.{11}\.mp4$/$1.mp4/' *.mp4
 

10 More Discussions You Might Find Interesting

1. Solaris

removing particular lines ending with a .cnt extension in a text file

I have a text file with rows of information (it is basically a ls command information(o/p from ls command)) I need to remove the lines ending with a .cnt extension and keep the lines ending with .zip extension, how to accomplish this. I also only need the date,size and name of the file from every... (2 Replies)
Discussion started by: ramky79
2 Replies

2. UNIX for Dummies Questions & Answers

Removing prefix from multiple files and renaming file extension

Hello i have the files in this format pdb1i0t.ent pdb1lv7.ent pdb1pp6.ent pdb1tj2.ent pdb1xg2.ent pdb2b4b.ent pdb2ewe.ent Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt The new file should look like this ... (3 Replies)
Discussion started by: empyrean
3 Replies

3. Shell Programming and Scripting

removing DOT by using perl

Hi Friends, I have a variable which has a number (e.g. 12.1234). I want to remove "." (dot) from that number i.e. 121234 I want to do this using perl. Can you please guide me Thank you Anushree (2 Replies)
Discussion started by: anushree.a
2 Replies

4. Shell Programming and Scripting

How to put a word starting at particular position in a file using shell scripting

Hi all, I'm new to shell scripting and hence this query. I have 2 files. temp.txt and config.txt. The values in temp.txt are tab separated. ex: temp.txt AB CDE GHIJ OPQRS WXY ex:config.txt (1st line for 1st element of temp.txt and so on) start = '1' end='5' start = '6' end =... (26 Replies)
Discussion started by: subhrap.das
26 Replies

5. Shell Programming and Scripting

Search the word to be deleted and delete lines above this word starting from P1 to P3

Hi, I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this: Records P1 10,23423432 ,77:1 ,234:2 P2 10,9089004 ,77:1 ,234:2 ,87:123 ,9898:2 P3 456456 P1 :123,456456546 P2 abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies

6. Shell Programming and Scripting

How to Removing a dot from a file name?

I need a script that will allow me to rename all of my files in subdir /FilesIn as follows: From kumc_835_111200.RMT.dat to kumc_835_111200RMT.dat kumc_835_111200.KMR.dat to kumc_835_111200KMR.dat .................etc How do I do that whithout doing a sed ... (10 Replies)
Discussion started by: mrn6430
10 Replies

7. Shell Programming and Scripting

how to remove a variable starting with dot using sed command

Hi, I want to remove a variable starting with dot(.) in a file using sed command. aaa sss .abc s/^\.abc/d I tried this but it didnt worked. (5 Replies)
Discussion started by: vdhingra123
5 Replies

8. UNIX for Dummies Questions & Answers

ls command with wild card can't return filenames starting with dot

I came across the following behaviour in Solaris 10 (x86-64bit) and RHEL 5.6 (Tikanga) -a option in ls command is supposed to list all files starting with a dot. From the man page of ls -a, --all do not ignore entries starting with . $ touch .mytestfile $ vi .mytestfile $... (2 Replies)
Discussion started by: kraljic
2 Replies

9. Shell Programming and Scripting

Rename except dot file extension

After reading the manual of the command rename I would like to apply it to a folder with a couple of files containing old style dots before the file-type, e.g. up.to.the.roof.avi. So I'd like to rename them without the dots in between. Therefore I tried it the following way rename -f -n ... (4 Replies)
Discussion started by: 1in10
4 Replies

10. Shell Programming and Scripting

Copy files based on specific word in a file name & its extension and putting it in required location

Hello All, Since i'm relatively new in shell script need your guidance. I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder. so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies
Info(3pm)						User Contributed Perl Documentation						 Info(3pm)

NAME
MP4::Info - Fetch info from MPEG-4 files (.mp4, .m4a, .m4p, .3gp) SYNOPSIS
#!perl -w use MP4::Info; my $file = 'Pearls_Before_Swine.m4a'; my $tag = get_mp4tag($file) or die "No TAG info"; printf "$file is a %s track ", $tag->{GENRE}; my $info = get_mp4info($file); printf "$file length is %d:%d ", $info->{MM}, $info->{SS}; my $mp4 = new MP4::Info $file; printf "$file length is %s, title is %s ", $mp4->time, $mp4->title; DESCRIPTION
The MP4::Info module can be used to extract tag and meta information from MPEG-4 audio (AAC) and video files. It is designed as a drop-in replacement for MP3::Info. Note that this module does not allow you to update the information in MPEG-4 files. $mp4 = MP4::Info->new(FILE) OOP interface to the rest of the module. The same keys available via "get_mp4info" and "get_mp4tag" are available via the returned object (using upper case or lower case; but note that all-caps 'VERSION' will return the module version, not the MPEG-4 version). Passing a value to one of the methods will not set the value for that tag in the MPEG-4 file. use_mp4_utf8([STATUS]) Tells MP4::Info whether to assume that ambiguously encoded TAG info is UTF-8 or Latin-1. 1 is UTF-8, 0 is Latin-1. Default is UTF-8. Function returns new status (1/0). If no argument is supplied, or an unaccepted argument is supplied, function merely returns existing status. This function is not exported by default, but may be exported with the ":utf8" or ":all" export tag. get_mp4tag (FILE) Returns hash reference containing the tag information from the MP4 file. The following keys may be defined: ALB Album APID Apple Store ID ART Artist CMT Comment COVR Album art (typically JPEG or PNG data) CPIL Compilation (boolean) CPRT Copyright statement DAY Year DISK Disk number & total (2 integers) GNRE Genre GRP Grouping NAM Title RTNG Rating (integer) TMPO Tempo (integer) TOO Encoder TRKN Track number & total (2 integers) WRT Author or composer For compatibility with MP3::Info, the MP3 ID3v1-style keys TITLE, ARTIST, ALBUM, YEAR, COMMENT, GENRE and TRACKNUM are defined as synonyms for NAM, ART, ALB, DAY, CMT, GNRE and TRKN[0]. Any and all of these keys may be undefined if the corresponding information is missing from the MPEG-4 file. On error, returns nothing and sets $@. get_mp4info (FILE) Returns hash reference containing file information from the MPEG-4 file. The following keys may be defined: VERSION MPEG version (=4) LAYER MPEG layer description (=1 for compatibility with MP3::Info) BITRATE bitrate in kbps (average for VBR files) FREQUENCY frequency in kHz SIZE bytes in audio stream SECS total seconds, rounded to nearest second MM minutes SS leftover seconds MS leftover milliseconds, rounded to nearest millisecond TIME time in MM:SS, rounded to nearest second COPYRIGHT boolean for audio is copyrighted ENCODING audio codec name. Possible values include: 'mp4a' - AAC, aacPlus 'alac' - Apple lossless 'drms' - Apple encrypted AAC 'samr' - 3GPP narrow-band AMR 'sawb' - 3GPP wide-band AMR 'enca' - Unspecified encrypted audio ENCRYPTED boolean for audio data is encrypted Any and all of these keys may be undefined if the corresponding information is missing from the MPEG-4 file. On error, returns nothing and sets $@. BUGS
Doesn't support writing tag information to MPEG-4 files. If you find a bug, please send me a patch. If you cannot figure out why it does not work for you, please put the MP4 file in a place where I can get it (preferably via FTP, or HTTP) and send me mail regarding where I can get the file, with a detailed description of the problem. I will keep a copy of the file only for as long as necessary to debug the problem. AUTHOR
Jonathan Harris <jhar@cpan.org>. THANKS
Chris Nandor <pudge@pobox.com> for writing MP3::Info Dan Sully at Slim Devices for cover art and iTunes/aacgain metadata patches. Ruben Laguna for PSP support. SEE ALSO
MP4::Info Project Page <http://search.cpan.org/~jhar/MP4-Info> ISO 14496-12:2004 - Coding of audio-visual objects - Part 12: ISO base media file format <http://www.iso.ch/iso/en/ittf/PubliclyAvailableStandards/c038539_ISO_IEC_14496-12_2004(E).zip> ISO 14496-14:2003 - Coding of audio-visual objects - Part 14: MP4 file format <http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=38538> (Not worth buying - the interesting stuff is in Part 12). 3GPP TS 26.244 - 3GPP file format(3GP) <http://www.3gpp.org/ftp/Specs/html-info/26244.htm> QuickTime File Format <http://developer.apple.com/documentation/QuickTime/QTFF/> ISO 14496-1 Media Format <http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt> MP3::Info <http://search.cpan.org/~cnandor/MP3-Info/> COPYRIGHT and LICENSE Copyright (c) 2004-2010, Jonathan Harris <jhar@cpan.org> This program is free software; you can redistribute it and/or modify it under the the same terms as Perl itself. perl v5.10.1 2010-07-30 Info(3pm)
All times are GMT -4. The time now is 05:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy