04-09-2013
It's also possible to make inefficient or unsafe one-liners; simplest isn't always best. Sometimes I see quality lost in the rush to squeeze things down into one line.
There's also some bad habits in trying to squeeze things down to the absolute mininum number of characters. I see this a lot in awk scripts -- using an unused variable instead of "" since it's one character shorter. That's baffling to read later.
4 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
This link might help whom is seeking a quick solutions for thier daily shell needs.
linkAll commands | commandlinefu.com (1 Reply)
Discussion started by: h@foorsa.biz
1 Replies
2. Shell Programming and Scripting
Guys,
I have a requirement like this.
A file has >5K records always. Separated by "|", it has 30 fields for each line. In some lines, I am getting an odd field. say, the 15th field is supposed to be 2 characters but comes in as >2. In this case, for resolving this I need to copy the value of... (6 Replies)
Discussion started by: PikK45
6 Replies
3. Shell Programming and Scripting
Hi All,
I got some awk one liners, how can i split it all into a nice script?
Got these:
gzcat capgw0.log-201308161376632741.gz | sed -n '/2013-08-16 05:56:/,/2013-08-16 05:58:/p' > timebased.log
awk -F":|," 'FNR==NR && /INFO - AId:/ {a=$0;next} END {for (i in a) print i "|" a}'... (8 Replies)
Discussion started by: batka
8 Replies
4. What is on Your Mind?
Hi fellas and fella-esses...
There are numerous threads on here where people ask for, and often expect, solutions to difficult problems solved using _one_liners_.
Why do they insist as such when it is virtually no different in execution time with well thought out indented code?
Is it me... (12 Replies)
Discussion started by: wisecracker
12 Replies
LEARN ABOUT DEBIAN
tm::literal
TM::Literal(3pm) User Contributed Perl Documentation TM::Literal(3pm)
NAME
TM::Literal - Topic Maps, simple values (literals)
SYNOPSIS
use TM::Literal;
my $l = new TM::Literal (42, 'xsd:integer');
print $l->[0]; # prints 42
print $l->[1]; # prints http://www.w3.org/2001/XMLSchema#integer
$l = new TM::Literal(42); # default is xsd:string
DESCRIPTION
This packages will eventually handle all literal handling, i.e. not only a way to create and retrieve information about simple values used
inside topic maps, but also all necessary operations such as integer addition, string manipulation.
This is quite a chore, especially since the data types adopted here are the XML Schema Data Types.
Constants
XSD http://www.w3.org/2001/XMLSchema#
INTEGER http://www.w3.org/2001/XMLSchema#integer
DECIMAL http://www.w3.org/2001/XMLSchema#decimal
FLOAT http://www.w3.org/2001/XMLSchema#float
DOUBLE http://www.w3.org/2001/XMLSchema#double
STRING http://www.w3.org/2001/XMLSchema#string
URI http://www.w3.org/2001/XMLSchema#anyURI
ANY http://www.w3.org/2001/XMLSchema#anyType
Grammar
TODO
Operations
TODO
SEE ALSO
TM
COPYRIGHT AND LICENSE
Copyright 200[6] by Robert Barta, <drrho@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2009-04-13 TM::Literal(3pm)