Sponsored Content
Full Discussion: Those simple one liners
The Lounge What is on Your Mind? Those simple one liners Post 302791537 by ahamed101 on Monday 8th of April 2013 04:32:40 PM
Old 04-08-2013
Those simple one liners

I wanted to say LOL and punch my face when I saw post#11 (where Don_Cragun even reduced the string manipulation with a simple regex) in the thread https://www.unix.com/shell-programmin...ilename-2.html

I mean, when things can be done with just a one liner, sometimes I tend to forgot those simple things and go for unwanted iterations.

Does this happen to you? You write a 10 liner and "HE" comes in with a one liner and you will be like "what?". Can't agree if someone says it cause of experience not in this case at least. May be our brain misses something sometimes and thinks too complex?

--ahamed
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

invaluable resource for shell one liners and more

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

awk - one liners

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

awk one liners into a nice script

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?

One liners, quick rant...

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
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)
All times are GMT -4. The time now is 08:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy