Commands tagged quotes (5)

  • Turns out smacie.com has a text file containing every single one of the borat quotes, each one on a newline. This makes it very convenient, as this can be done without any sed-parsing, and uses less bandwitdth! Note that borate quotes are quite offensive, much more so than "fortunes-off"! Show Sample Output


    2
    curl -s "http://smacie.com/randomizer/borat.txt" | shuf -n 1 -
    benjabean1 · 2014-12-16 04:18:48 11
  • ls -Q will show the filenames in quotes. xargs -p rm will print all the filenames piped from ls -Q and ask for confirmation before deleting the files. without the -Q switch, if we have spaces in names, then the files won't be deleted. Show Sample Output


    1
    ls -Q * | xargs -p rm
    temp_reg · 2010-01-27 02:46:49 9
  • I improved a bit on the original by only using sed and extracting the quote with a matching group. Use -nE for sed on Mac OSX Use -nr for sed on Linux. Warning! The quotes from Borat are definitely offensive. Show Sample Output


    1
    curl -s http://smacie.com/randomizer/borat.html | sed -nE "s# *<td valign=\"top\"><big><big><big><font face=\"Comic Sans MS\">(.*)</font></big></big></big></td>#\1#p"
    phymata · 2012-07-18 21:31:43 3
  • Just pulls a quote for each day and displays it in a notification bubble... or you can change it a bit and just have it run in the terminal wget -q -O "quote" https://www.goodreads.com/quotes_of_the_day;echo "Quote of the Day";cat quote | grep '&ldquo;\|/author/show' | sed -e 's/<[a-zA-Z\/][^>]*>//g' | sed 's/&ldquo;//g' | sed 's/&rdquo;//g'; rm -f quote Show Sample Output


    0
    wget -q -O "quote" https://www.goodreads.com/quotes_of_the_day;notify-send "$(echo "Quote of the Day";cat quote | grep '&ldquo;\|/author/show' | sed -e 's/<[a-zA-Z\/][^>]*>//g' | sed 's/&ldquo;//g' | sed 's/&rdquo;//g')"; rm -f quote
    nowhereman88 · 2014-06-15 03:17:19 61
  • I always forget this one and find all kinds of complex solutions on google. Also works great while piping data. ex. 'cat data | process-data | tr -d "\"" > processed-data-without-quotes'


    0
    tr -d "\"" < infile.csv > noquotes.csv
    UnklAdM · 2015-09-11 23:41:48 12

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

force unsupported i386 commands to work on amd64
The above was done using the i386 flashplayer plugin, and was installed on a AMD64 machine running an AMD64 kernel and AMD64 programs. the resulting plugin install ultimately didn't work for swiftfox (but worked for iceweasel) without also covering it with a nspluginwrapper which took a bit of fenangaling to get to work (lots of apt-getting) but it is a nice feature to be able to trick installers that think you need i386 into running on a amd64, or at least attempting to run on amd64. Enjoy

Gets the english pronunciation of a phrase
Usage examples: say hello say "hello world" say hello+world

Generat a Random MAC address
Generate a random MAC address with capital letters

Extract tarball from internet without local saving

Check whether laptop is running on battery or cable
The original proc file doesn't exist on my system.

Install pip with Proxy
Installs pip packages defining a proxy

Send a local file via email
This just reads in a local file and sends it via email. Works with text or binary. *Requires* local mail server.

dont execute command just add it to history as a comment, handy if your command is not "complete" yet

list files recursively by size

Get the IP address
gives u each configured IP in a seperate line.


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: