Sponsored Content
Full Discussion: One liners, quick rant...
The Lounge What is on Your Mind? One liners, quick rant... Post 302977497 by elixir_sinari on Tuesday 19th of July 2016 07:11:21 AM
Old 07-19-2016
When I started out on unix.com, I was awestruck by the ultra-compressed one-liners from the clever guys (Scrutinizer, you were my hero!!!). Over time, I learned from you guys and started doling out some good (I believe Smilie) one-liners myself.

I viewed one-liners as a way to test my knowledge and bring in some supposedly esoteric features of the tool into the solution. But, now I realize that the people who will actually use that solution will hardly appreciate (or be able to) the "art". Also, the "compression" will only confuse myself some time in the future! So, it's better to make a trade-off somewhere...
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where can I rant?

First of all, apologies to the admins for not reading the rules totally and missing the bit about ranting off about other OSs. But that raises a question. Where do you go to have a good rant, to vent your disgust at various corporations and thier hideous behaviour? :confused: (2 Replies)
Discussion started by: u6ik
2 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. What is on Your Mind?

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-programming-scripting/220553-add-0-start-filename-2.html I mean, when things can be done with just a one liner, sometimes I... (6 Replies)
Discussion started by: ahamed101
6 Replies

4. What is on Your Mind?

A rant...

Hi guys... (Apologies for any typos etc...) This is basically a rant. I have been doing kids level projects and writing code to suit since around 1982, for the uProfessor, for the Sinclair Spectrum and later for the QL, IBM-XT in MS-DOS and after that for a 386DX40 up to Windows 95, until I... (3 Replies)
Discussion started by: wisecracker
3 Replies
WWW::CNic::Simple(3pm)					User Contributed Perl Documentation				    WWW::CNic::Simple(3pm)

NAME
WWW::CNic::Simple - a procedural interface to WWW::CNic SYNOPSIS
#!/usr/bin/perl use WWW::CNic::Simple; my @suffixes = suffixes(); my %results = check('test-domain', 'uk.com', 'uk.net'); print "test-domain.uk.com is registered. " if ($results{'uk.com'} == 1); my %whois = whois('test-domain.uk.com'); print "domain status: $whois{status} "; DESCRIPTION
This interface is intended for those who want a simplified view of the WWW::CNic library. It provides simple functions for querying the CentralNic system, making it ideal for one-liners and other tasks. Please note that it is not possible to make domain registrations or modifications using "WWW::CNic::Simple". FUNCTIONS
my @suffixes = suffixes(); This function returns an array containing the currently live CentralNic suffixes. my %result = check($domain, @suffixes); This function does an availability check on $domain against the suffixes contained in @suffixes. Note that if @suffixes is omitted the check will run against all CentralNic domains. The function returns a hash of the form: my %result = ( 'uk.com' => 1, 'uk.net' => 0, 'eu.com' => 0); where 1 indicates that the domain is already registered. my %whois = whois($domain); This function returns a hash containing whois data for the given $domain This hash is of the form: my %whois = { chandle => { postcode => 'SW6 4SN', country => 'UK', userid => 'C11480', fax => 'N/A', addr => "163 New King's Road, Fulham, London", name => 'Hostmaster', email => 'webservices@centralnic.com', phone => '020 7751 9000', company => 'CentralNic Ltd' }, expires => '1001458800', status => 'Live', thandle => # as chandle above bhandle => # as chandle above registrant => 'CentralNic Ltd', domain => 'toolkit-test.uk.com', created => '1001458800' }; COPYRIGHT
This module is (c) 2011 CentralNic Ltd. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o http://toolkit.centralnic.com/ o WWW::CNic o WWW::CNic::Cookbook perl v5.12.3 2011-05-13 WWW::CNic::Simple(3pm)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy