01-12-2006
ls *.GIF | xargs -I {} basename {} .GIF | xargs -I {} mv {}.GIF {}.gif
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i'm halfway into my script and realize i may need to use an associative array (a hash, i guess they are called in Perl). i'm fairly new to Perl and don't know how to use them correctly.
i have some files in a directory. each file contains a number in a specific place in it's header. what i would... (4 Replies)
Discussion started by: quantumechanix
4 Replies
2. Shell Programming and Scripting
Renaming Files more than 1000 in Diffrent Directories in system..
help me in this issue to resolve.... (5 Replies)
Discussion started by: sunsap
5 Replies
3. UNIX for Dummies Questions & Answers
I just can't figure this one out.
I have a lot of files name (for example) ABC1234.5678.ext
I need to rename these files U0105678PQRS
So I'm removing everything before the first "."
I'm keeping "5678" in the file name
Adding "U010" to the front of "5678"
Dropping the ".ext" extension
... (5 Replies)
Discussion started by: bbbngowc
5 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
Can someone please help. Much appreciated!!
I have 4 directories, for ex...
/RUN1/ReportTable.nxt
/RUN2/ReportTable.nxt
/RUN3/ReportTable.nxt
/RUN4/ReportTable.nxt
I would like to write a for loop, to add the directory name to each ReportTable.nxt
I would like for it to be:
... (5 Replies)
Discussion started by: dirttysoufff
5 Replies
6. UNIX for Dummies Questions & Answers
I just used wget to obtain a bunch of html documents. Now they are named index.html, index.html.1, index.html.2, etc. I'd simply like to move the 1, 2, 3 etc. to the left before the .html, so the new names would be: index1.html, index2.html etc. I know this can be done with a simple script, but... (2 Replies)
Discussion started by: crl21
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file with about 50k keywords. I have a requirement to scan about 3k files to identify which filename has which keyword i.e. an output like following:
File1,Keyword1
File1,Keyword2
File3,Keyword1
.....
I have written a shell script which takes each of the 3k files, searches... (4 Replies)
Discussion started by: rjains
4 Replies
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
Hi,
I have 31 file as below.... dt_ref_med_merged_madt_h_19980101.nc
..
..
dt_ref_med_merged_madt_h_19980131.nc
I want to rename it like...
dt_ref_med_merged_madt_h_1998_1.nc
..
..
dt_ref_med_merged_madt_h_1998_31.nc
How can I do it ? any suggestions ? I want to do it small... (5 Replies)
Discussion started by: mahesh shinde
5 Replies
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
giftopnm
giftopnm(1) General Commands Manual giftopnm(1)
NAME
giftopnm - convert a GIF file into a portable anymap
SYNOPSIS
giftopnm [--alphaout={alpha-filename,-}] [-verbose] [-comments] [-image N] [GIFfile]
DESCRIPTION
This is a graphics format converter from the GIF format to the PNM (i.e. PBM, PGM, or PPM) format.
If the image contains only black and maximally bright white, the output is PBM. If the image contains more than those two colors, but only
grays, the output is PGM. If the image contains other colors, the output is PPM.
If you have an animated GIF file, you can extract individual frames from it with gifsicle and then convert those using giftopnm.
A GIF image contains rectangular pixels. They all have the same aspect ratio, but may not be square (it's actually quite unusual for them
not to be square, but it could happen). The pixels of a Netpbm image are always square. Because of the engineering complexity to do oth-
erwise, giftopnm converts a GIF image to a Netpbm image pixel-for-pixel. This means if the GIF pixels are not square, the Netpbm output
image has the wrong aspect ratio. In this case, giftopnm issues an informational message telling you to run pnmscale to correct the out-
put.
OPTIONS
--alphaout=alpha-filename
giftopnm creates a PGM (portable graymap) file containing the alpha channel values in the input image. If the input image doesn't
contain an alpha channel, the alpha-filename file contains all zero (transparent) alpha values. If you don't specify --alphaout,
giftopnm does not generate an alpha file, and if the input image has an alpha channel, giftopnm simply discards it.
If you specify - as the filename, giftopnm writes the alpha output to Standard Output and discards the image.
See pnmcomp(1) for one way to use the alpha output file.
-verbose
Produce verbose output about the GIF file input.
-comments
Only output GIF89 comment fields.
-image N
Output the specified gif image from the input GIF archive (where N is '1', '2', '20'...). Normally there is only one image per
file, so this option is not needed.
All flags can be abbreviated to their shortest unique prefix.
RESTRICTIONS
This does not correctly handle the Plain Text Extension of the GIF89 standard, since I did not have any example input files containing
them.
SEE ALSO
ppmtogif(1), ppmcolormask(1), pnmcomp(1), gifsicle(1) <http://www.lcdf.org/gifsicle>, ppm(5).
AUTHOR
Copyright (c) 1993 by David Koblas (koblas@netcom.com)
LICENSE
If you use giftopnm, you are using a patent on the LZW compression method which is owned by Unisys, and in all probability you do not have
a license from Unisys to do so. Unisys typically asks $5000 for a license for trivial use of the patent. Unisys has never enforced the
patent against trivial users, and has made statements that it is much less concerned about people using the patent for decompression (which
is what giftopnm does than for compression. The patent expires in 2003 / 2004, depending on the country.
Rumor has it that IBM also owns a patent covering giftopnm.
A replacement for the GIF format that does not require any patents to use is the PNG format.
13 January 2001 giftopnm(1)