Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Last active June 16, 2017 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/55bea2e6b3b03760440f113a0df3f99d to your computer and use it in GitHub Desktop.
Save JoshCheek/55bea2e6b3b03760440f113a0df3f99d to your computer and use it in GitHub Desktop.
Options which aren't valid one-letter flags for ls
#!/usr/bin/env bash
man ls | col -b | ruby -ane '
BEGIN { valid = [] }
END { puts [*?a..?z, *?A..?Z, *?0..?9] - valid }
$F[0] =~ /^-(\S)$/ && valid << $1
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment