08-15-2005
Quote:
Originally Posted by bruceps
I guess that I wasn't specific enough.
the script -
uncompress $1
mv `basename $1 .Z` newfilename
requires input of a file name. What I tried to say was
where $1 = basename.Z
after compression this becomes basename
how do I rename $1 or save to another variable the filename = basename
by itself?
not sure if I understand what you're trying to explain, but....
After the decompression '$1' will still have the value of 'basename.Z' and the decompressed file will be named 'basename'.
Can you try to explain again, pls!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a program that will export my data to a single file, but it assigns a file name that is overridden every time I run the program. I need to change the file name to have a sequential number in the filename.
How do I rename a file so that the filename contains the system date and time. I want... (5 Replies)
Discussion started by: wayneb
5 Replies
2. UNIX for Dummies Questions & Answers
I compressed a file by using gzip command
gzip <<xx>>
filename changed to xx.gz
How to view this xx.gz file. Any idea.
Thanks in advance. (7 Replies)
Discussion started by: venkatesht
7 Replies
3. Shell Programming and Scripting
i have a file 4d7a94d0.bbb.1292
when i do
file 4d7a94d0.bbb.1292
the ouput is below
4d7a94d0.bbb.1292: gzip compressed data - deflate method
and i run this command
gunzip -c 4d7a94d0.bbb.1292 | awk '{gsub("\"","")}/I_ACCOUNT_ID/{print $2}' RS=":|;" FS=","
i get... (3 Replies)
Discussion started by: blackzinga80
3 Replies
4. Shell Programming and Scripting
Hi all,
Wondering how this could be accomplished........
a directory contains sequentially numbered files from fw01 to fw999.
How would I insert an additional zero so that the directory lists these files in a proper manner?
(i.e. all double digit files from fw01 to fw99 would become... (3 Replies)
Discussion started by: putter1900
3 Replies
5. Shell Programming and Scripting
Hi,
I have several files with name
b1.root, b2.root b3.root
I want to rename the "b" to "bkg", so finally is should be:
bkg1.root bkg2.root bkg3.root
I used command:
rename s/b/bsig/ b*root
Somehow it is working at some place and not working in other folder. I do not have any idea... (3 Replies)
Discussion started by: nrjrasaxena
3 Replies
6. Shell Programming and Scripting
Hi friends ,
i want to change the filename as below
filename=ABC_HYND_JDHD_20130125120345.txt
expected output : ABC_HYND_JDHD_20130125.txt
i have tried using awk but not able to procedd futher. i am trying to do the above in single commad.
echo... (3 Replies)
Discussion started by: i150371485
3 Replies
7. Shell Programming and Scripting
Hi
I have a file with filename as "partition-setup-and-ipl.vtcmd.76217657132.9721536798"
Now i need to move this file as "partition-setup-and-ipl.vtcmd.76217657132.9721536798_org"
i tried with
# ls | grep -E "partition-setup-and-ipl.vtcmd.+"... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
8. Shell Programming and Scripting
I have many compressed files I want to search using awk and want to print some file contents along with the filename it came from on each output record (I simplified awk command).
Here are the results with the files uncompressed:
awk '{print FILENAME, $0}' test*.txt
test1.txt from test1... (3 Replies)
Discussion started by: mjf
3 Replies
9. Shell Programming and Scripting
Hi,
I have a lot of files similar to the below order. I want to rename all the files .discrading the time stamp/numbers after cnf.
Existing files
id_info_20130405.cnf_20130801
in_info_20130405.cnf_20130891
iz_info_20130405.cnf_20130821
in_info_20130405.cnf_20130818... (2 Replies)
Discussion started by: saravanapandi
2 Replies
10. UNIX for Beginners Questions & Answers
Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies
LEARN ABOUT DEBIAN
image::exiftool::writepng
Image::ExifTool::WritePNG(3pm) User Contributed Perl Documentation Image::ExifTool::WritePNG(3pm)
NAME
Image::ExifTool::WritePNG.pl - Write PNG meta information
SYNOPSIS
These routines are autoloaded by Image::ExifTool::PNG.
DESCRIPTION
This file contains routines to write PNG metadata.
NOTES
Compress::Zlib is required to write compressed text.
Existing text tags are always rewritten in their original form (compressed zTXt, uncompressed tEXt or internation iTXt), so pre-existing
compressed information can only be modified if Compress::Zlib is available.
Newly created textual information is written in uncompressed tEXt form by default, or as compressed zTXt if the Compress option is used and
Compress::Zlib is available (but only if the resulting compressed data is smaller than the original text, which isn't always the case for
short text strings).
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.
SEE ALSO
Image::ExifTool::PNG(3pm), Image::ExifTool(3pm)
perl v5.12.4 2011-01-03 Image::ExifTool::WritePNG(3pm)