I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
I have large number of data files, close to 300 files, lets say all files are same kind and have extension .dat , each file have mulitple lines in it.
There is a unique line in each file containing string 'SERVER'. Right after this line there is another line which contain a string 'DIGIT=0',... (4 Replies)
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Please find the input file as given below:
2012/02/29 11:00:00~~CRITICAL~For customer 00000476 no daily files were found in the 010137933 account directory.
2012/02/29 11:00:00~~CRITICAL~For customer 05006802 no daily files were found in the 010115166 account directory.
2012/02/29... (0 Replies)
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 Replies)
Hello,
Beginning with shell scipting, I'm trying to find in a csv file, the lines where the field related to hostname is displayed as an FQDN intead the hostname. (some lines are correct) and the to correct that inside the file:
Novell,11.0,UNIX Server,bscpsiws02,TxffnX1tX1HiDoyBerrzWA==... (2 Replies)
I have a dilemma, we have users who are copying files to "directory 1." These images have file names which include the year it was taken. I need to put together a script to do the following:
Examine the file naming convention, ensuring it's the proper format (e.g. test-1983_filename-123.tif)... (8 Replies)
Discussion started by: Nvizn
8 Replies
LEARN ABOUT DEBIAN
poet::util::debug
Poet::Util::Debug(3pm) User Contributed Perl Documentation Poet::Util::Debug(3pm)NAME
Poet::Util::Debug - Debug utilities
SYNOPSIS
# In a script...
use Poet::Script;
# In a module...
use Poet;
# Automatically available in Mason components
# then...
# die with value
dd $data;
# print value to STDERR
dp $data;
# print value to logs/console.log
dc $data;
# return value prepped for HTML
dh $data;
# same as above with full stacktraces
dds $data;
dps $data;
dcs $data;
dhs $data;
DESCRIPTION
These debug utilities are automatically imported wherever "use Poet" or "use Poet::Script" appear, and in all components. Because let's
face it, debugging is something you always want at your fingertips.
However, for safety, the short named versions of these utilities are no-ops outside of development mode, in case debug statements
accidentally leak into production (we've all done it). You have to use longer, less convenient names outside of development for them to
work.
UTILITIES
Each of these utilities takes a single scalar value. The value is serialized with Data::Dumper and prefixed with a file name, line number,
and pid. e.g.
dp { a => 5, b => 6 };
prints to STDERR
[dp at ./d.pl line 6.] [1436] {
a => 5,
b => 6
}
The variants suffixed with 's' additionally output a full stack trace.
dd ($val), dds ($val)
Die with the serialized $val.
dp ($val), dps ($val)
Print the serialized $val to STDERR. Useful in scripts.
dc ($val), dcs ($val)
Append the serialized $val to "console.log" in the "logs" subdirectory of the environment. Useful as a quick alternative to full-bore
logging.
dh ($val), dhs ($val)
Returns the serialized $val, surrounded by "<pre> </pre>" tags. Useful for embedding in Mason components, e.g.
<% dh($data) %>
Live variants
Each of the functions above must be appended with "_live" in order to work in live mode. e.g.
# This is a no-op in live mode
dp [$foo];
# but this will work
dp_live [$foo];
SEE ALSO
Poet
AUTHOR
Jonathan Swartz <swartz@pobox.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-05 Poet::Util::Debug(3pm)