Commands by 123nor (1)

  • I was concerned that the other scripts didn't use the correct order of operations for the calculation. Variance needs to be squared before being summed, then divided by NR and then square rooted. Not sure if this method is correct but this is what I came up with. I think it works correctly but I'm not totally sure. If anyone could critique it that would be great.


    0
    awk '{delta=$1; avg+=$1/NR;} END {print "stdev = " sqrt(((delta-avg)^2)/NR);}'
    123nor · 2016-04-19 08:49:49 0

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Rip DVD to YouTube ready MPEG-4 AVI file using mencoder
Rip DVD to YouTube ready AVI file, using MPEG-4 video codec and MP3 audio codec. Resizes to 320x240 and deinterlaces as needed.

Remove all the files except abc in the directory
This is for zsh with extended globbing.

checking space availabe on all /proc/mounts points (using Nagios check_disk)
More info here: http://nagioswiki.com/wiki/index.php/Checking_/proc/mounts_on_remote_server

List of commands you use most often

Merge PDFs into single file

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Show sorted list of files with sizes more than 1MB in the current dir
Taken from here: http://linsovet.com/directory-usage-size-sorted-list

Generate an XKCD #936 style 4 word passphrase (fast)
Some snippets posted are slow on big dictionaries, this one is fast.

Randomize lines (opposite of | sort)
random(6) - random lines from a file or random numbers

List all symbolic links in current directory that matches regexp
Perl alternative to list symlinks with a clumsy regexp filter: place the regex instead of he example 'libxml' and end it with a wildchar to see the results (previous cd on dir). Is it possible change the '-l' test for '-d' and it will search for directories. [Same applies for -x and -X. See $(perldoc -f -x) for more tests]. I use it quite often when dealing with shared libraries...


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: