7 More Discussions You Might Find Interesting
1. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
2. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
3. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Programming
I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories.
but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies
6. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
7. Shell Programming and Scripting
Hi
how to check input is "empty" and "numeric" in ksh?
e.g:
./myscript.ksh k
output show: invalid number input
./myscript.ksh
output show: no input
./myscript.ksh 10
output show: input is numeric (6 Replies)
Discussion started by: geoffry
6 Replies
Tie::iCal(3pm) User Contributed Perl Documentation Tie::iCal(3pm)
NAME
Tie::iCal - Tie iCal files to Perl hashes.
VERSION
This document describes version 0.14 released 1st September 2006.
SYNOPSIS
use Tie::iCal;
tie %my_events, 'Tie::iCal', "mycalendar.ics" or die "Failed to tie file!
";
tie %your_events, 'Tie::iCal', "yourcalendar.ics" or die "Failed to tie file!
";
$my_events{"A-NEW-UNIQUE-ID"} = [
'VEVENT',
{
'SUMMARY' => 'Bastille Day Party',
'DTSTAMP' => '19970714T170000Z',
'DTEND' => '19970715T035959Z',
}
];
tie %our_events, 'Tie::iCal', "ourcalendar.ics" or die "Failed to tie file!
";
# assuming %my_events and %your_events
# have no common keys (unless that's your intention)
#
while (my($uid,$event) = each(%my_events)) {
$our_events{$uid} = $event;
}
while (my($uid,$event) = each(%your_events)) {
$our_events{$uid} = $event;
}
untie %our_events;
untie %your_events;
untie %my_events;
DEPENDENCIES
Tie::File
DESCRIPTION
Tie::iCal represents an RFC2445 iCalendar file as a Perl hash. Each key in the hash represents an iCalendar component like VEVENT, VTODO or
VJOURNAL. Each component in the file must have a unique UID property as specified in the RFC 2445. A file containing non-unique UIDs can be
converted to have only unique UIDs (see samples/uniquify.pl).
The module makes very little effort in understanding what each iCalendar property means and concentrates on the format of the iCalendar
file only.
FILE LOCKING
The Tie::iCal object returned by tie can also be used to access the underlying Tie::File object. This is accessible via the 'A' class
variable. This may be useful for file locking.
my $ical = tie %events, 'Tie::iCal', "mycalendar.ics";
$ical->{A}->flock;
DATES
The iCalendar specification uses a special format for dates. This module makes no effort in trying to interpret dates in this format. You
should look at the Date::ICal module that can convert between Unix epoch dates and iCalendar date strings.
How Tie::iCal interprets iCal files
Tie::iCal interprets files by mapping iCal components into Perl hash keys and iCal content lines into various Perl arrays and hashes.
Components
An iCal component such as VEVENT, VTODO or VJOURNAL maps to a hash key:-
BEGIN:VEVENT
UID:a_unique_uid
NAME1:VALUE1
..
END:VEVENT
corresponds to
$events{'a_unique_uid'} = ['VEVENT', {'NAME1' => 'VALUE1'}]
Subcomponents
An iCal subcomponent such as VALARM maps to a list of hash keys:-
BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT1S
TRIGGER;VALUE=DURATION:-PT1S
END:VALARM
BEGIN:VALARM
X-TIE-ICAL;VALUE=ANOTHER:HERE
X-TIE-ICAL:HERE2
X-TIE-ICAL-NAME:HERE2
END:VALARM
corresponds to
'VALARM' => [
{
'TRIGGER' => [
[{'VALUE' => 'DURATION'},'-PT1S'],
[{'VALUE' => 'DURATION'},'-PT1S']
]
},
{
'X-TIE-ICAL' => [
[{'VALUE' => 'ANOTHER'},'HERE'],
['HERE2']
],
'X-TIE-ICAL-NAME' => 'HERE2'
}
]
To see how individual content lines are formed see below.
Content Lines
Once unfolded, a content line may look like:-
NAME;PARAM1=PVAL1;PARAM2=PVAL2;...:VALUE1,VALUE2,...
having an equivalent perl data structure like: -
'NAME' => [{'PARAM1'=>'PVAL1', 'PARAM2'=>'PVAL2', ..}, 'VALUE1', 'VALUE2', ..]
or
NAME:VALUE1,VALUE2,...
having an equivalent perl data structure like: -
'NAME' => ['VALUE1', 'VALUE2', ..]
or
NAME:VALUE
having an equivalent perl data structure like: -
'NAME' => 'VALUE'
An blank value is mapped from
NAME:
to
'NAME' => ''
Multiple contentlines with same name, i.e. FREEBUSY, ATTENDEE:-
NAME;PARAM10=PVAL10;PARAM20=PVAL20;...:VALUE10,VALUE20,...
NAME;PARAM11=PVAL11;PARAM21=PVAL21;...:VALUE11,VALUE21,...
...
having an equivalent perl data structure like: -
'NAME' => [
[{'PARAM10'=>'PVAL10', 'PARAM20'=>'PVAL20', ..}, 'VALUE10', 'VALUE20', ..],
[{'PARAM11'=>'PVAL11', 'PARAM21'=>'PVAL21', ..}, 'VALUE11', 'VALUE21', ..],
...
]
or
NAME:VALUE10,VALUE20,...
NAME:VALUE11,VALUE21,...
...
having an equivalent perl data structure like: -
'NAME' => [
['VALUE10', 'VALUE20', ..],
['VALUE11', 'VALUE21', ..],
...
]
or in a mixed form, i.e.
NAME:VALUE10,VALUE20,...
NAME;PARAM11=PVAL11;PARAM21=PVAL21:VALUE11,VALUE21,...
NAME:VALUE12,VALUE22,...
...
having an equivalent perl data structure like: -
'NAME' => [
['VALUE10', 'VALUE20', ..],
[{'PARAM11'=>'PVAL11', 'PARAM21'=>'PVAL21', ..}, 'VALUE11', 'VALUE21', ..],
['VALUE12', 'VALUE22', ..],
...
]
BUGS
Property names are assumed not to be folded, i.e.
DESCR
IPTION:blah blah..
RRULE property does not support parameters.
Property names that begin with UID can potentially confuse this module.
Subcomponents such as VALARM must exist after any UID property.
Deleting events individually may leave non-RFC2445 compliant empty VCALENDAR objects.
AUTHOR
Blair Sutton, <mailto:bsdz@cpan.org>, <http://www.numeninest.com/>
COPYRIGHT
Copyright (c) 2006 Blair Sutton. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
SEE ALSO
perl, Tie::File, Date::ICal
perl v5.12.4 2011-11-11 Tie::iCal(3pm)