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
RUSH(8) 							      Gnurush								   RUSH(8)

NAME
rush - a restricted user shell SYNOPSIS
rush [-F STRING] [-f DIR] [-n NUM] [--forward] [-H] rush {-v | -h | --usage} DESCRIPTION
GNU rush is a restricted user shell (R-U-SH), designed for sites that provide only limited remote access to their resources. This could be Subversion or Git repositories, upload sites accessible only by Scp, or similar services. Using a sophisticated configuration file, GNU rush gives the administrator complete control over the command lines that users are able to execute, as well as over the access to and usage of system resources. Usually virtual memory, CPU time, etcetera, are determined by this system wide configuration. OPTIONS
-c COMMAND Specify a command to run. -C TEST | --security-check=TEST Configure security checks for the main configuration file. -d NUM | --debug=NUM Set debugging level. --show-default Disply the built-in default configuration. -t | --test | --lint [FILE] Run in test mode. The optional argument FILE determines the location of an alternate configuration file to be used. In case also the option '-c' is specified, then rush will emulate normal processing for the given command, but will not actually execute it. -u NAME | --user=NAME Emulate shell access by the user NAME. The option '--test' is implied. The use of this option is allowed only for root and in conjunction with the further option '-c'. -v | --version Display program version. -h | --help Display a short help message. --usage Display a concise usage summary. SEE ALSO
The full documentation for GNU Rush is maintained as a Texinfo manual. If the info and rush programs are properly installed at your site, the command info rush should give you access to the complete manual. See also rushlast(1) and rushwho(1). AUTHOR
This text was written by Mats Erik Andersson for the Debian project, since the original source supplies a documentation only in the form of a GNU Texinfo manual. GNU Rush 1.7 December 2010 RUSH(8)
All times are GMT -4. The time now is 05:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy