11-10-2011
Yes, I did get it to work using awk.
As noted, if someone can tell me why Ygor's code did not work, I would like to know. Thanks for everyone's help!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
Our group is just starting to get into UNIX here. We are former REXX users on a VM Mainframe. Can someone point me to the documentation to read a file and write a file in a Unix Shell Script or does this have to be done in another language?
Thank you in advance...
Dave (3 Replies)
Discussion started by: tracydp
3 Replies
2. Programming
Hi gurus
I am not a C programmer but I need to read and write files on a computer on LAN using IP address.
Suppose on a computer that has an IP 192.168.0.2
Any help or code example. I did in JAVA using URL, but do not know how to do in ANSI-C.
In java:
-------
URL url = new... (3 Replies)
Discussion started by: lucky001
3 Replies
3. Shell Programming and Scripting
Is it possible to read from or write to sockets with ksh?
I use AIX 5.3 (1 Reply)
Discussion started by: rein
1 Replies
4. UNIX and Linux Applications
Hi All,
I want to read and write into Excel files.
I want my script to generate the required output directly in the Excel format.
Is it possible through unix scripting or shall I have to use some other language for this purpose?
Waiting for your suggestion.
Thanks in Advance.
... (3 Replies)
Discussion started by: AshishK
3 Replies
5. UNIX for Dummies Questions & Answers
Hi my prob statement is to create a new file or to append to the 1tst file the followign chages.
File 1: txt file.
portfolio No a b c d
abc 1 Any Any Any charString
cds 2 values values values charString
efd 3 can can can charString
fdg 4 come come come charString... (4 Replies)
Discussion started by: szchmaltz
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have the following shell script code which tries to sftp and writes the log into the log file.
TestConnection ()
{
echo 'Connection to ' $DESTUSERNAME@$DESTHOSTNAME
$SETDEBUG
if ]; then rm $SCRIPT ; fi
touch $SCRIPT
echo "cd" $REMOTEDIR >> $SCRIPT
echo "quit" >>... (10 Replies)
Discussion started by: valluvan
10 Replies
7. Programming
Hello everybody,
I'm trying to code a program which makes the following:
It sends an ARP request frame and when it gets the reply, extracts the IP address of source and writes it to a .txt file. This is gonna be done with many hosts (with a for() loop), so, the text file would look like... (2 Replies)
Discussion started by: Zykl0n-B
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have several text files. One main file contains the detail data, other have some information to extract data from the main file, and some are empty files. Examples are shown below:
The main file look like:
MainFile.txt
>Header1
data1...data1...
>Header2
data2...data2...
...
...... (2 Replies)
Discussion started by: Fahmida
2 Replies
9. Shell Programming and Scripting
hello all,
please any one can provide me the shell script to write data to /dev/ttyS1
and read responce from /dev/ttyS1 and compare the responce to some string ..
thnxx
---------- Post updated at 03:35 PM ---------- Previous update was at 11:46 AM ----------
any body help me..
how do i... (1 Reply)
Discussion started by: yashwantkumar
1 Replies
10. Shell Programming and Scripting
Hi All,
Here is my requirement. I am grepping through the log files and cutting some fields from the file to generate a csv file. Now I have to check if 2nd field is having some fixed value then with the help of 4th field I have to look in same log and run another grep command to retrieve the... (11 Replies)
Discussion started by: kmajumder
11 Replies
LEARN ABOUT DEBIAN
datetime::format::builder::parser::quick
DateTime::Format::Builder::Parser::Quick(3pm) User Contributed Perl Documentation DateTime::Format::Builder::Parser::Quick(3pm)
NAME
DateTime::Format::Builder::Parser::Quick - Use another formatter, simply
SYNOPSIS
use DateTime::Format::Builder (
parsers => { parse_datetime => [
{ Quick => 'DateTime::Format::HTTP' },
{ Quick => 'DateTime::Format::Mail' },
{ Quick => 'DateTime::Format::IBeat' },
]});
is the same as:
use DateTime::Format::HTTP;
use DateTime::Format::Mail;
use DateTime::Format::IBeat;
use DateTime::Format::Builder (
parsers => { parse_datetime => [
sub { eval { DateTime::Format::HTTP->parse_datetime( $_[1] ) } },
sub { eval { DateTime::Format::Mail->parse_datetime( $_[1] ) } },
sub { eval { DateTime::Format::IBeat->parse_datetime( $_[1] ) } },
]});
(These two pieces of code can both be found in the test suite; one as quick.t, the other as fall.t.)
DESCRIPTION
"Quick" adds a parser that allows some shortcuts when writing fairly standard and mundane calls to other formatting modules.
SPECIFICATION
"Quick" has two keys, one optional.
The "Quick" keyword should have an argument of either an object or a class name. If it's a class name then the class is "use"d.
The "method" keyword is optional with a default of "parse_datetime". It's either name of the method to invoke on the object, or a reference
to a piece of code.
In any case, the resultant code ends up looking like:
my $rv = $Quick->$method( $date );
THANKS
See the main module's section.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
Alternatively, log them via the CPAN RT system via the web or email:
http://perl.dellah.org/rt/dtbuilder
bug-datetime-format-builder@rt.cpan.org
This makes it much easier for me to track things and thus means your problem is less likely to be neglected.
LICENCE AND COPYRIGHT
Copyright X Iain Truskett, 2003. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.000 or,
at your option, any later version of Perl 5 you may have available.
The full text of the licences can be found in the Artistic and COPYING files included with this module, or in perlartistic and perlgpl as
supplied with Perl 5.8.1 and later.
AUTHOR
Iain Truskett <spoon@cpan.org>
SEE ALSO
"datetime@perl.org" mailing list.
http://datetime.perl.org/
perl, DateTime, DateTime::Format::Builder
perl v5.10.1 2010-03-14 DateTime::Format::Builder::Parser::Quick(3pm)