Sponsored Content
Full Discussion: renaming files
Top Forums Shell Programming and Scripting renaming files Post 302673775 by complex.invoke on Wednesday 18th of July 2012 11:17:23 AM
Old 07-18-2012
Code:
for i in *.jpeg; do
    mv "${i}" "${i/jpy/hhk}"
done

or
Code:
rename jpy hhk *.jpeg

This User Gave Thanks to complex.invoke For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

renaming files

i have a set of *.lst files. now i want to change the names from "lst" to "dat". how to do it? ex.: -rw-r--r-- 1 rram group 22 Sep 21 13:10 a.lst -rw-r--r-- 1 rram group 22 Sep 21 13:09 b.lst -rw-r--r-- 1 rram group 22 Sep 21 13:10 c.lst... (4 Replies)
Discussion started by: raguramtgr
4 Replies

2. UNIX for Dummies Questions & Answers

renaming the files

Hi All, Today I got a small problem while handling zipped files in PROD support. There are files in this format and I had to grep them reading some contents A.B.gz.C.D where A,B,C and D stand for variables (like FIRST.NAME.gz.MIDDLE.LAST). I know that these files are zipped files and If I... (1 Reply)
Discussion started by: adurga
1 Replies

3. UNIX for Dummies Questions & Answers

renaming files

directory name = /usr/tom/1997 files - ABC_1997_ST1_BCD.SQL BCD_1997_ST1_EFG_SAB.SQL TTT_EBC_1997_ST1_A.SQL sub directory - /usr/tom/1997/jan a) I want to just rename the all files ending with '.SQL' and also its contents in the 1997 directory(excluding subdirectories eg... (3 Replies)
Discussion started by: systemsb
3 Replies

4. UNIX for Dummies Questions & Answers

Renaming files

Hello! I am not familiar with UNIX and I have this problem: I need to move files from a UNIX machine to a PC. UNIX file names contain ":" as special character which is not recognized in a PC. How can I change ":" for "_" in the name of a bunch of files in UNIX? Thanks for your help. (7 Replies)
Discussion started by: Tygoon
7 Replies

5. UNIX for Dummies Questions & Answers

renaming files

I have a list of files named ab_*.csv I would like to remane them all by removing the ab_ and have *.csv I did the following but I am surely missing something. /* wrong script */ for i in `ls -1 ab_*`; do mv ab_$i $i; done Thanks in advance. (1 Reply)
Discussion started by: jxh461
1 Replies

6. Shell Programming and Scripting

renaming files

Hi all, using a utility image file was named starting with blank space and a blank space in between. I want to rename the files. file names are in the format " sb 12.tif"," sb 13.tif"," sb 14.tif" the files are in thousands. i want to rename as 12.tif, 13.tif, 14.tif.... thanks. (3 Replies)
Discussion started by: ahkverma
3 Replies

7. Shell Programming and Scripting

renaming files or adding a name in the beginning of all files in a folder

Hi All I have a folder that contains hundreds of file with a names 3.msa 4.msa 21.msa 6.msa 345.msa 456.msa 98.msa ... ... ... I need rename each of this file by adding "core_" in the begiining of each file such as core_3.msa core_4.msa core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies

8. Shell Programming and Scripting

Renaming files

Hi i have to achieve the following i have files as xyz001.csv, xyz002.csv.......xyz0025.csv in a folder, i need to keep xyz001.csv as it is but want to remove the extra zero on filename from 10 say xyz0010 should be renamed to xyz010 xyz0025 should be renamed as xyz025 Note xyz... (8 Replies)
Discussion started by: mad_man12
8 Replies

9. Shell Programming and Scripting

Renaming files

Hello, I am looking for a command line that will rename name files : f700_abc_o_t_MASTERID_AS_AE_20130323.csv like this f700_abc_o_t_MASTERID_AS_AE_20130324.csv The great idea could be to get the date stamp 20130323 and change any part of it, instead of just change the... (4 Replies)
Discussion started by: Aswex
4 Replies

10. Shell Programming and Scripting

Renaming multiple files in sftp server in a get files script

Hi, In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this? I am using #!/bin/ksh For eg: sftp user@host <<EOF cd /path get *.txt rename *.txt *.txt.done ... (7 Replies)
Discussion started by: jhilmil
7 Replies
jpeg(n)                                                       JPEG image manipulation                                                      jpeg(n)

__________________________________________________________________________________________________________________________________________________

NAME
jpeg - JPEG querying and manipulation of meta data SYNOPSIS
package require Tcl 8.2 package require jpeg ?0.3.3? ::jpeg::isJPEG file ::jpeg::imageInfo file ::jpeg::dimensions file ::jpeg::getThumbnail file ::jpeg::getExif file ?section? ::jpeg::formatExif keys ::jpeg::exifKeys ::jpeg::removeExif file ::jpeg::stripJPEG file ::jpeg::getComments file ::jpeg::addComment file text... ::jpeg::removeComments file ::jpeg::replaceComment file text ::jpeg::debug file ::jpeg::markers channel _________________________________________________________________ DESCRIPTION
This package provides commands to query and modify JPEG images. JPEG stands for Joint Photography Experts Group and is a standard for the lossy compression of photographical images. It is specified at LINK_HERE. COMMANDS
::jpeg::isJPEG file Returns a boolean value indicating if file is a JPEG image. ::jpeg::imageInfo file Returns a dictionary with keys version, units, xdensity, ydensity, xthumb, and ythumb. The values are the associated properties of the JPEG image in file. Throws an error if file is not a JPEG image. ::jpeg::dimensions file Returns the dimensions of the JPEG file as a list of the horizontal and vertical pixel count. Throws an error if file is not a JPEG image. ::jpeg::getThumbnail file This procedure will return the binary thumbnail image data, if a JPEG thumbnail is included in file, and the empty string otherwise. Note that it is possible to include thumbnails in formats other than JPEG although that is not common. The command finds thumbnails that are encoded in either the JFXX or EXIF segments of the JPEG information. If both are present the EXIF thumbnail will take precedence. Throws an error if file is not a JPEG image. set fh [open thumbnail.jpg w+] puts -nonewline $fh [::jpeg::getThumbnail photo.jpg] close $fh ::jpeg::getExif file ?section? section must be one of main or thumbnail. The default is main. Returns a dictionary containing the EXIF information for the speci- fied section. For example: set exif { Make Canon Model {Canon DIGITAL IXUS} DateTime {2001:06:09 15:17:32} } Throws an error if file is not a JPEG image. ::jpeg::formatExif keys Takes a list of key-value pairs as returned by getExif and formats many of the values into a more human readable form. As few as one key-value may be passed in, the entire exif is not required. foreach {key val} [::jpeg::formatExif [::jpeg::getExif photo.jpg]] { puts "$key: $val" } array set exif [::jpeg::getExif photo.jpg] puts "max f-stop: [::jpeg::formatExif [list MaxAperture $exif(MaxAperture)]] ::jpeg::exifKeys Returns a list of the EXIF keys which are currently understood. There may be keys present in getExif data that are not understood. Those keys will appear in a 4 digit hexadecimal format. ::jpeg::removeExif file Removes the Exif data segment from the specified file and replaces it with a standard JFIF segment. Throws an error if file is not a JPEG image. ::jpeg::stripJPEG file Removes all metadata from the JPEG file leaving only the image. This includes comments, EXIF segments, JFXX segments, and applica- tion specific segments. Throws an error if file is not a JPEG image. ::jpeg::getComments file Returns a list containing all the JPEG comments found in the file. Throws an error if file is not a valid JPEG image. ::jpeg::addComment file text... Adds one or more plain text comments to the JPEG image in file. Throws an error if file is not a valid JPEG image. ::jpeg::removeComments file Removes all comments from the file specified. Throws an error if file is not a valid JPEG image. ::jpeg::replaceComment file text Replaces the first comment in the file with the new text. This is merely a shortcut for ::jpeg::removeComments and ::jpeg::addCom- ment Throws an error if file is not a valid JPEG image. ::jpeg::debug file Prints everything we know about the given file in a nice format. ::jpeg::markers channel This is an internal helper command, we document it for use by advanced users of the package. The argument channel is an open file handle positioned at the start of the first marker (usually 2 bytes). The command returns a list with one element for each JFIF marker found in the file. Each element consists of a list of the marker name, its offset in the file, and its length. The offset points to the beginning of the sections data, not the marker itself. The length is the length of the data from the offset listed to the start of the next marker. LIMITATIONS
can only work with files cant write exif data gps exif data not parsed makernote data not yet implemented BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category jpeg of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
comment, exif, image, jfif, jpeg, thumbnail COPYRIGHT
Copyright (c) 2004-2005, Code: Aaron Faupell <afaupell@users.sourceforge.net> Copyright (c) 2007, Code: Andreas Kupries <andreas_kupries@users.sourceforge.net> Copyright (c) 2004-2007, Doc: Andreas Kupries <andreas_kupries@users.sourceforge.net> jpeg 0.3.3 jpeg(n)
All times are GMT -4. The time now is 04:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy