This is a basis for other Google API commands.
If you need to randomize the lines in a file, but have an old sort commands that doesn't support the -R option, this could be helpful. It's easy enough to remember so that you can create it as a script and use that. It ain't real fast. It ain't safe. It ain't super random. Do not use it on untrusted data. It requires bash for the $RANDOM variable to work. Show Sample Output
My Programming Languages professor assigned my class a homework assignment where we had to write a Perl interpreter using Perl. I really like Python's interactive command line interpreter which inspired this Perl script.
Use sed to comment out any up/down bindings in zsh
This must be run the first time while logged into your Mac desktop, as it will graphically prompt for access permissions. Subsequent uses will not prompt, assuming you select "Always allow". Show Sample Output
Useful to browse dangerous web sites. Show Sample Output
Gets only when the state is connected.
To show your current resolution on your desktop Show Sample Output
Create ISO image of a folder in Linux. You can assign label to ISO image and mount correctly with -allow-lowercase option.
This is the answer to the 0th problem from the python challenge < http://www.pythonchallenge.com/ >. Replace sensible-browser with firefox, w3m or whatever. Show Sample Output
Changed out the for loop for an xargs. It's a tad shorter, and a tad cleaner.
If you rebase and delete a lot of remote branches via git, your list of branches will end up showing branches on origin that no longer exist. This command will clear them out. Show Sample Output
Recursively replace a string in files with lines matching string. Lines with the string "group name" will have the first > character replaced while other > characters on other lines will be ignored. Show Sample Output
Will handle pretty much all types of CSV Files. The ^M character is typed on the command line using Ctrl-V Ctrl-M and can be replaced with any character that does not appear inside the CSV. Tips for simpler CSV files: * If newlines are not placed within a csv cell then you can replace `map(repr, r)` with r Show Sample Output
This is a minimalistic version of the ubiquitious Google definition screen scraper. This version was designed not only to run fast, but to work using BusyBox. BusyBox is a collection of basic Unix tools that have been compiled into a single binary to save space on tiny installations of Unix. For example, although my phone doesn't have perl or the GNU utilities, it does have BusyBox's stripped down versions of wget, tr, and sed. It turns out that those tools suffice for many tasks. Known Bugs: This script does not handle HTML entities at all. I don't think there's an easy way to do that within BusyBox, but I'd love to see it if someone could do it. Also, this script can only define a single word, not phrases. (Well, you could if you typed in %20, but that'd be gross.) Lastly, this script does not show the URL where definitions were found. Given the randomness of the Net, that last bit of information is often key. Show Sample Output
simple find -> xargs sort of thing that I get a lot of use out of. Helps find huge files and gives an example of how to use xargs to deal with them. Tested on OSX snow leopard (10.6). Enjoy. Show Sample Output
By setting the UNIX95 variable in HP-UX the XPG4 mode is activated, you get new options for ps and other commands, for me the best way to use this is to create an alias named ptree in root profile: alias ptree='UNIX95=1 ps -eH'
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.
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
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: