Commands by plokij (1)

  • Search a string in YouTube using GET command, parse the response with a suitable replace pattern and pipe its result to VLC Show Sample Output


    0
    GET https://www.youtube.com/results?search_query=shaun+the+sheep | sed -ne '/<a href="\/watch.*title="/s/.*<a href="\(\/watch[^"]*\)".* title="\([^"]*\)".*/https:\/\/www.youtube.com\1/p' | vlc -
    plokij · 2016-10-28 23:55:59 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

Disable sleep mode via cli and systemd (Centos, Debian Ubuntu?)
This causes computer to never power off or go into sleep mode. Disables sleep mode linux.

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows

Signals list by NUMBER and NAME
This command seems to achieve the similar/same goal.

strips the first field of each line where the delimiter is the first ascii character

Find all files that have nasty names
Get a list of file names that may cause problems (eg being served on a webserver, typing a URL on a mobile, etc)

Binary clock
Fun idea! This one adds seconds and keeps running on the same line. Perl's probably cheating though. :)

Move all but the newest 100 emails to a gzipped archive

Using numsum to sum a column of numbers.
if you, like me, do not have the numsum, this way can do the same.

Get all IPs via ifconfig
Fetches the IPs and ONLY the IPs from ifconfig. Simplest, shortest, cleanest. Perl is too good to be true... (P.S.: credit should go to Peteris Krumins at catonmat.net)

follow the content of all files in a directory
The `-q' arg forces tail to not output the name of the current file


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: