Sponsored Content
Full Discussion: Those simple one liners
The Lounge What is on Your Mind? Those simple one liners Post 302791883 by Corona688 on Tuesday 9th of April 2013 12:01:49 PM
Old 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

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
cfengine(8)						      System Manager's Manual						       cfengine(8)

NAME
cfshow - Dump cfengine databases SYNOPSIS
/usr/sbin/cfshow [options] DESCRIPTION
cfengine is a language based system specifically designed for testing and configuring unix-like systems attached to a TCP/IP network. cfshow is a tool for showing the contents of the internal databases used by cfengine in its operation. Many users will not care about these internal details, while cfengine manages the system transparently. More advanced users might desire a simple way to dump the contents of these databases to text, for reporting purposes. HTML and XML versions of the output are provided for easy integration with reporting. EXAMPLES
cfshow --locks cfshow --last-seen cfshow --checksum cfshow --active cfshow --audit cfshow --classes cfshow --regex These show the named databases. OPTIONS
Here are all of the options supported: --help (-h) --debug (-d) --verbose (-v) --locks (-l) --last-seen (-s) --performance (-p) --checksum (-c) --classes (-C) --filename (-f) --regex (-r) --active (-a) --version (-V) --html (-H) --xml (-X) --purge (-P) --audit (-A) FILES
cfshow reads cfengine internal information that is normally stored in the Work Directory /var/cfengine. AUTHOR
Mark Burgess, Oslo University College INFORMATION
http://www.cfengine.org HiOslo Maintenance Commands cfengine(8)
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy