Sponsored Content
Full Discussion: One liners, quick rant...
The Lounge What is on Your Mind? One liners, quick rant... Post 302977438 by jim mcnamara on Monday 18th of July 2016 07:17:52 AM
Old 07-18-2016
Scrutinizer - sysadmins do put two or three commands together on the fly. I do. Pipe this command into this other command and then sort the output. That is essentially what the -exec predicate does for the find command.

Scripts coded as giant one-liners are out of bounds. Period. rbatte1 covers why really well.

I thought we were discussing the massive one-liners we see here a lot. We seem to want to define good and bad one-liners here. So let's say one-liners in scripts meant to be part of production should not be written as "multi-blobs" of piped commands.
 

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
ExtUtils::Typemaps::Cmd(3pm)				 Perl Programmers Reference Guide			      ExtUtils::Typemaps::Cmd(3pm)

NAME
ExtUtils::Typemaps::Cmd - Quick commands for handling typemaps SYNOPSIS
From XS: INCLUDE_COMMAND: $^X -MExtUtils::Typemaps::Cmd -e "print embeddable_typemap(q{Excommunicated})" Loads "ExtUtils::Typemaps::Excommunicated", instantiates an object, and dumps it as an embeddable typemap for use directly in your XS file. DESCRIPTION
This is a helper module for ExtUtils::Typemaps for quick one-liners, specifically for inclusion of shared typemaps that live on CPAN into an XS file (see SYNOPSIS). For this reason, the following functions are exported by default: EXPORTED FUNCTIONS
embeddable_typemap Given a list of identifiers, "embeddable_typemap" tries to load typemaps from a file of the given name(s), or from a module that is an "ExtUtils::Typemaps" subclass. Returns a string representation of the merged typemaps that can be included verbatim into XS. Example: print embeddable_typemap( "Excommunicated", "ExtUtils::Typemaps::Basic", "./typemap" ); This will try to load a module "ExtUtils::Typemaps::Excommunicated" and use it as an "ExtUtils::Typemaps" subclass. If that fails, it'll try loading "Excommunicated" as a module, if that fails, it'll try to read a file called Excommunicated. It'll work similarly for the second argument, but the third will be loaded as a file first. After loading all typemap files or modules, it will merge them in the specified order and dump the result as an embeddable typemap. SEE ALSO
ExtUtils::Typemaps perlxs AUTHOR
Steffen Mueller "<smueller@cpan.org"> COPYRIGHT &; LICENSE Copyright 2012 Steffen Mueller This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2014-01-06 ExtUtils::Typemaps::Cmd(3pm)
All times are GMT -4. The time now is 12:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy