Skip to content

Instantly share code, notes, and snippets.

@LeeMendelowitz
Last active August 29, 2015 14:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeeMendelowitz/e001c9600b1666ae90d4 to your computer and use it in GitHub Desktop.
Save LeeMendelowitz/e001c9600b1666ae90d4 to your computer and use it in GitHub Desktop.
Bash one-liners

find with redirected stdout

find . -name '*.aln' | xargs -I {} sh -c 'cut -f 1 "$1" > "$1.cut"' -- {}

This will find all files *.aln and then output the first column to *.aln.cut.

get filetypes

file *.stderr > file_types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment