Hi Everyone :),
Need your advice as I'm new to UNIX scripting.. I'm trying to write a script to capture snoop output for 5 minutes for every hour for 24 hours. To stop snoop, I need to press Control-C to break it. This is what I got so far, but now I'm stuck! :confused:
The script:
# cat... (2 Replies)
Trying to finish up my script that automates some video encoding work.
Situation: There is an MKV file to be transcoded.
Problem: MKVINFO will give a bunch of output about an MKV file, included in that output are two lines I am interested in:
| + Default duration: 41.708ms (23.976 fps... (9 Replies)
Hi All,
I need help on the following req.
I am getting output of a command as follows:
16377612 total memory
3802460 used memory
2827076 active memory
681948 inactive memory
12575152 free memory
477452 buffer memory
I want to compute used... (1 Reply)
hi,
i have the followiing scenario where by i am parsing teh following output using cut -d
like so
#!/bin/bash
output="ABCTable|
------------------|
|
------------------|
code |
name |
amount |"
col1= $output | cut -d'|' -f5
col2= $output | cut -d'|'... (1 Reply)
Hi!
I have run the following command: snoop -q -d e1000g0 -o /var/tmp/optima0.txt & them I am trying to read the output of it with snoop -i /var/tmp/optima0.txt, which is giving me this: # snoop -i /var/tmp/optima0.txt | more
1 0.00000 AIOPTSVR -> 10.100.4.72 TCP D=1393 S=22 Push... (8 Replies)
Hi ,
I have a jil file which i am trying to parse and print the job name and the condition corresponding to it.
Below is the input file
/* -------------------- testjob1 -------------------- */
insert_job: testjob1 job_type: c
machine: unix
owner: chidori
condition: s(joba) and... (9 Replies)
Output of the below code includes unmatched date.Please correct it
df -k|awk '$4>50 {print $1, "\t"$4,"\t" $7}'
It gives output less than 50% also. (5 Replies)
Hi,
I got the code below is one of the threads from this forum.
lineCount=$(iostat | wc -l)
numDevices=$(expr $lineCount - 7);
iostat $interval -x -t |
awk -v awkCpuFile=$cpuFile -v awkDeviceFile=$deviceFile -v awkNumDevices=$numDevices '
BEGIN {
print... (2 Replies)
Discussion started by: gopivallabha
2 Replies
LEARN ABOUT DEBIAN
courriel::header::contenttype
Courriel::Header::ContentType(3pm) User Contributed Perl Documentation Courriel::Header::ContentType(3pm)NAME
Courriel::Header::ContentType - The content type for an email part
VERSION
version 0.29
SYNOPSIS
my $ct = $part->content_type();
print $ct->mime_type();
print $ct->charset();
my %attr = $ct->attributes();
while ( my ( $k, $v ) = each %attr ) {
print "$k => $v
";
}
DESCRIPTION
This class represents the contents of a "Content-Type" header attached to an email part. Such headers always include a mime type, and may
also include additional information such as a charset or other attributes.
Here are some typical headers:
Content-Type: text/plain; charset=utf-8
Content-Type: multipart/alternative; boundary=abcdefghijk
Content-Type: image/jpeg; name="Filename.jpg"
API
This class supports the following methods:
Courriel::Header::ContentType->new_from_value( ... )
This takes two parameters, "name" and "value". The "name" is optional, and defaults to "Content-Type".
The "value" is parsed and split up into the mime type and attributes.
Courriel::Header::ContentType->new( ... )
This method creates a new object. It accepts the following parameters:
o name
This defaults to 'Content-Type'.
o value
This is the full header value.
o mime_type
A string like "text/plain" or "multipart/alternative". This is required.
o attributes
A hash reference of attributes from the header, such as a boundary, charset, etc. The keys are attribute names and the values can
either be strings or Courriel::HeaderAttribute objects. Values which are strings will be inflated into objects by the constructor.
This is optional, and can be an empty hash reference or omitted entirely.
$ct->name()
The header name, usually "Content-Type".
$ct->value()
The raw header value.
$ct->mime_type()
Returns the mime type value passed to the constructor. However, this value will be in all lower-case, regardless of the original casing
passed to the constructor.
$ct->charset()
Returns the charset for the content type, which will be the value found in the "attributes", if one exists.
$ct->attributes()
Returns a hash (not a reference) of the attributes passed to the constructor.
Attributes are Courriel::HeaderAttribute objects.
The keys of the hash are all lower case, though the original casing is preserved in the "name()" returned by the Courriel::HeaderAttribute
object.
$ct->is_binary()
Returns true unless the attachment looks like text data. Currently, this means that is has a charset defined and the charset is not
"binary".
$ct->attribute($key)
Given a key, returns the named Courriel::HeaderAttribute object. Obviously, this value can be "undef" if the attribute doesn't exist. Name
lookup is case-insensitive.
$ct->attribute_value($key)
Given a key, returns the named attribute's value as a string. Obviously, this value can be "undef" if the attribute doesn't exist. Name
lookup is case-insensitive.
The attribute is a Courriel::HeaderAttribute object.
$ct->as_header_value()
Returns the object as a string suitable for a header value (but not folded). Note that this uses the original casing of the mime type as
passed to the constructor.
EXTENDS
This class extends Courriel::Header.
ROLES
This class does the Courriel::Role::HeaderWithAttributes role.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
perl v5.14.2 2012-03-07 Courriel::Header::ContentType(3pm)