Sponsored Content
Top Forums Shell Programming and Scripting Need help renaming bulk file extentions Post 302193110 by ismail.dhaoui on Thursday 8th of May 2008 02:08:50 PM
Old 05-08-2008
Hi there,

I'm not close to my Linux Box, but I think the dots has no problem :

for i in `ls -l | awk '{ print $NF}'`
do
mv $i $i".txt"
done

Check on dummy files before, my code isn't checked.Smilie
 

10 More Discussions You Might Find Interesting

1. Programming

How to read specific lines in a bulk file using C file Programming

Please Help me I have a Bulk file containing Hex data I want to read specific lines from that bulk file by ID number. example ID DATE Time data 14 2005/09/28 07:40:08.546 0 5 078B1C 01916C 0FE59C 004B54 0A9670 0D04ED 05B6B4 0E2223... (10 Replies)
Discussion started by: rajan_ka1
10 Replies

2. Shell Programming and Scripting

extract bulk emails into a single flat file

Hello Can someone guide me how to extract bulk emails into a single flat file ? We receive mails (approx 1K daily ). I want the contents of the emails for 'current date' to be dumped into one single text file. Please help. (1 Reply)
Discussion started by: Amruta Pitkar
1 Replies

3. Shell Programming and Scripting

How to bulk changing partial file name in Linux?

I have a bunch of database files in a directory. Their name are like: 1234_ABCD_01.dbf, 28hrs_ABCD_02.dbf I want to change them in bulk to: 1234_XXXU_01.dbf, 28hrs_XXXU_02.dbf. I mean I just want to replace ABCD by XXXU. don't change other part of the file name and the contents of the... (4 Replies)
Discussion started by: duke0001
4 Replies

4. Shell Programming and Scripting

bulk renaming of files in sftp using script

Hi, Am using sftp (dsa method) to transfer 20 files from one server(sftp) to another (local). After the transfer is complete the files in the sftp server has to be renamed from .txt extension to .done extension ( aa.txt to aa.done, bb.txt to bb.done and likewise...). I tried rename command... (4 Replies)
Discussion started by: Sindhuap
4 Replies

5. UNIX for Dummies Questions & Answers

regularly copy files to different directory with different file extentions

I have a NAS and I upload my videos to it from time to time. the video format is 3gp but my media player PBO could only play avi. I want to copy these files to different directory and change the extention from 3gp to avi. (yes I want to keep the original version and create a duplicate version with... (0 Replies)
Discussion started by: momentum
0 Replies

6. Shell Programming and Scripting

Renaming bulk directories and subfiles

Hi, I have a directory with 100 subdirectories and each of these subdirectories has 1 file. Now I have to rename all these. The structure is "files directory has 100 SRR191639-SRR191718 subfolders and in each there is a file with the same name a subdirectory followed by .sra extension... (5 Replies)
Discussion started by: Diya123
5 Replies

7. Shell Programming and Scripting

Renaming files in bulk.

Hi, I have a bunch of files which are named something like: Company Name~1234~X1234~X1-123.pdf I need to get them renamed something like: Company Name~1234(X1234)X1-123.pdf Once I have the X1234 inside () I have a piece of software which can use the X1234 bit. I will be receiving... (7 Replies)
Discussion started by: jcborland
7 Replies

8. Shell Programming and Scripting

How to select bulk of info from log file?

unix : sun shell : bash i need to select multiple rows with this format : <special format> 10 lines /<special format> from log file that have lots of info i thought of getting the number of the first line using grep -n "special format" file | cut -d: -f1 then pass it to shell... (2 Replies)
Discussion started by: scorpioneer
2 Replies

9. UNIX for Dummies Questions & Answers

Bulk changing of file names using Terminal in OS X

I want to change the name of several files within a folders (directory) and subdirectories in OS X. If I only wanted to change file names within the directory I guess I would use: rm photo*.jpg picture*.jpg I have lots of subdirectories, is there a way of getting the file changes for all... (5 Replies)
Discussion started by: ademanuele
5 Replies

10. UNIX for Beginners Questions & Answers

Zenity and bulk file movements

Hi all. Total beginner to Zenity. I've plagiarised bits of code from all over to try to get something to work. The story: I have a directory with maybe 10-15 files in it, each about 200MB. i send these files one at a time to a drive about 15 miles away. The Synology sync can only handle... (0 Replies)
Discussion started by: Alfitch
0 Replies
Mail::Box::Tie::HASH(3pm)				User Contributed Perl Documentation				 Mail::Box::Tie::HASH(3pm)

NAME
Mail::Box::Tie::HASH - access an existing message folder as a hash SYNOPSIS
tie my(%inbox), 'Mail::Box::Tie::HASH', $folder; foreach my $msgid (keys %inbox) { print $inbox{$msgid}; delete $inbox{$msgid}; } $inbox{$msg->messageId} = $msg; DESCRIPTION
Certainly when you look at a folder as being a set of related messages based on message-id, it is logical to access the folder through a hash. For a tied hash, the message-id is used as the key. The message-id is usually unique, but when two or more instances of the same message are in the same folder, one will be flagged for deletion and the other will be returned. This implementation uses basic folder access routines which are related to the message-id. METHODS
Constructors TIEHASH('Mail::Box::Tie::HASH', FOLDER) Connects the FOLDER object to a HASH. example: my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(access => 'rw'); tie my(%inbox), 'Mail::Box::Tie::HASH', $folder; Tied Interface $obj->CLEAR() Remove the contents of the hash. This is not really possible, but all the messages will be flagged for deletion. example: %inbox = (); %inbox = ($msg->messageId, $msg); #before adding msg $obj->DELETE(MESSAGE-ID) Remove the message with the specified MESSAGE-ID. example: delete $inbox{$msgid}; $obj->EXISTS(MESSAGE-ID) Check whether a message with a certain MESSAGE-ID exists. example: if(exists $inbox{$msgid}) ... $obj->FETCH(MESSAGEID) Get the message with the specified id. The returned message may be a dummy if message thread detection is used. Returns "undef" when there is no message with the specified id. example: my $msg = $inbox{$msgid}; if($inbox{$msgid}->isDummy) ... $obj->FIRSTKEY() See NEXTKEY(). $obj->NEXTKEY(PREVIOUS) FIRSTKEY() returns the first message-id/message pair from the folder, and NEXTKEY returns the message-id/message pair for the next message, in the order in which the message is stored in the folder. Messages flagged for deletion will not be returned. See the Mail::Box::messages() method of the folder type for more information about the folder message order. example: foreach my $msgid (keys %inbox) ... foreach my $msg (values %inbox) ... while(my ($msgid, $msg) = each %inbox) { $msg->print unless $msg->isDeleted; } $obj->STORE(undef, MESSAGE) Store a message in the folder. The key must be "undef", because the message-id of the specified message is taken. This is shown in the first example. However, as you see, it is a bit complicated to specify "undef", therefore the string "undef" is accepted as well. The message may be converted into something which can be stored in the folder type which is at stake. The added instance is returned. example: $inbox{ (undef) } = $msg; $inbox{undef} = $msg; SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/ LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2012-05-07 Mail::Box::Tie::HASH(3pm)
All times are GMT -4. The time now is 12:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy