I'm in need of help for a project that I'm working on. I believe Perl would be the best way of handling the string manipulation, however, I've barely used perl, and I'm used to BASH scripting. Another note is, this project is in a Windows environment, so I can use Perl, but I do not have shell based utilities available to me, unfortunately.
I have a batch job run that runs tiffinfo on several tiff images, and I get the following output:
This is just for one tiff image. If I had 4 tiff images, for example, my output would be the following:
What I'm wanting is, for some perl code to be written to manipulate each "block" of text a certain way. I guess we could call a "block" each section between each TYPE: section. Here's how I'm needing each block formatted:
The value of Compression Scheme:, Resolution:, Photometric Interpretation:, Image Width:, Image Length: all need to be separated by colons, right after the filename (after TYPE:). For example the final output (if you were only manipulating 1 block) would be:
If there are any Perl gurus out there, I'm looking to discuss how to get this completed. Please let me know and any help is appriciated.
---------- Post updated at 08:33 AM ---------- Previous update was at 08:33 AM ----------
Note sure why the text looks so bad, I used bbcode and formatted it correctly, double and tripple checked open/close tags.
i want to generate a list line-by-line of normal characters
using letters . for example :
dnds
gnos
mgod
pets
jnfp
etc...
i want to use all letters with all the posibilities
is there a script that can do this ? (3 Replies)
Hello unix.com
I'm having trouble with a text file.
It looks like this:
Alvaro Costa Daldit Kaur Sings Brian G Heward
Desmond Ogilvie John Der William Gherasim
Lance Mackey Donald Kopplin Robert Mckinlay
Jahir Hussain Mohamed Jack Benaim Abraham Weiss
I want... (7 Replies)
Hello unix.com users,
I have a ip file (line-by-line). How can I delete the ips that keep repeating by mark XXX.XXX.XXX.* ... I want to erase only the lines that keep repeating more than 2 times.
Example:
1.2.3.1
1.2.3.2
1.2.3.3
I want to erase all ips blocks that are repeating by C... (1 Reply)
Hello Unix.com,
I have a text in format:
john
sara
lee
How can I make it:
john:john
john:john1
john:john12
john:john123
sara:sara
sara:sara12
sara:sara123 and so on (2 Replies)
Hello again unix.com
How can I extract from a large file in format:
steve@aol.com steve hawkins Location of this member is bla bla bla
sun@hotmail.com Sun Ying This member is using browser bla bla bla
to another text in format:
steve@aol.com steve hawkins
sun@hotmail.com sun ying
... (5 Replies)
Hello unix.com people!
How can I modify a text in format:
A:B:C
A:B:C
A:B:C
into
C/A/B
C/A/B
C/A/B
Note: Text is line by line and "C", "B", "A" fields are different each row.
Thanks in advance. (7 Replies)
Hello All,
I have been working on a great script to remotely gather server info and store it in a .txt that can be imported to .xls
I have been reading the hostnames that are in the /.shh/known_hosts file so I don't have to mess with passing a password - via ssh (not easy to do , by the... (1 Reply)
Hi there,
I have some text files in unix format that processed by a program in windows, and when I open them with less or vi in linux, a warn for opening binary file is prompted, and as shown in vi, between every two characters there was inserted a "^@". How can I fix this. Plus, there are over... (2 Replies)
Hi
I have only ever used awk and sed for basic requirements up until now.
I have had to break a log down for multiple purposes.
Using awk, sed and a date script. I am left with this:
(message id, time of msg attempt, message id, domain name, time of msg completion)
... (4 Replies)