Remove everything after the second "rev" to only display the duplicate filenames and their hashes.
tested on solaris 10
Just added a little url encoding with sed - urls with spaces don't work well - this also works against instead of enclosure and adds a sample to show that you can filter against links at a certain domain Show Sample Output
finds all xml files greps them for extracts the bean id sorts the ids creates a list of distinct entries, a unique list of bean ids Show Sample Output
use fsnotify on linux, fswatch on OS-X
If there are less than 10 folders, this script will not delete them
Requirements: Google Authenticator is configured as per document (http://blogs.vmware.com/consulting/files/2015/02/VMW_15Q1_TD_Horizon-View-Google-Authenticator_021715_FINAL_EMonjoin.pdf) including the patch at the end of the document. Login as the user to be provisioned. su username Command will: 1. Silently provision a user for Google Authenticator (TOTP) 2. Remove the unnecessary (and unsecure) code that uses google.com to create the QR code in browser. 3. Decode URL (first instance) 4. Decode URL (second instance) 5. Create a QR code 6. Send email to an account with the QR Code attached User scans QR code with Google Authenticator.
NSFW - use this on personal laptops where you want your personal user to have all the groups Show Sample Output
1. No for-loop, but xargs. 2. Append "--" in git-reset HEAD command to deal with filenames contained leading hyphen/minus sign (-). 3. Add "--porcelain" option in git-status command for easy-to-parse format when scripting. 4. Add "--no-run-if-empty" option in xargs command to prevent you run it twice and accidentally reset all staged changes. 5. Use zero byte (NUL character) as line terminator instead of newline (\n) to make it more robust to deal with filename with whitespaces. pipe#1: git-status. pipe#2: Use "grep" to filter out "non-added" files. pipe#3: use "sed" to Trim out the leading three characters, reserve the filename. pipe#4: xargs + git-reset... p.s. The "HEAD" in git-reset can be omitted . And, maybe, the third part of this shell pipe (sed) has potential to be enhanced.
Returns a list, with attributes (think `ls -l`), in reverse chronological order. N is a single numeric parameter. Robust against unfriendly filenames and directory structures. Show Sample Output
I used this to resolve runtime dependencies of an application to create self-contained tar-balls (e.g. PHP for Docker or Rkt) Requirements: - realpath - ldd - find - grep - sort - uniq - xargs
Useful for looking up and commits that you may have lost during a rebase or when rewriting some history.
list all directory sizes and sort by size
Here's a quick way to clean up old xauth entries.
Check that all websites on the current server are working as expected. This is a quick easy way to do that. Show Sample Output
Replace thread_link with the link of the thread you want to download images of.
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: