Skip to main content
100%

Bash one-liners

✓ Published0🌍 Public
LLeeMendelowitz
Last edited Mar 3, 2015
Created on Mar 3, 2015

Two Bash one-liners demonstrate how to process files from the command line. The first uses `find` and `xargs` to locate all `*.aln` files, then pipes each filename into a `sh -c` command that runs `cut` to extract the first column, saving the output as a new file with a `.cut` extension. The second one-liner pipes the output of `file` into a redirect, capturing the file type information for every `*.stderr` file into a text file named `file_types`. The examples use standard Unix tools—`find`, `xargs`, `sh -c`, `cut`, `file`, and shell redirection—to perform file discovery and simple text transformation.

AI-generated description

Similar vizzes