Tagged in


quotes in awk

Lazily trying to paste a long list of strings into python, which means I need things wrapped in quotes (and commas, but I'm excluding them from this example cause they're easy). Grabbing the strings from a file using awk, but since quotes (apostrophes) are special in awk this messes things …

man cut and other simple yet useful unix bits

Instead of just reading the man file, you could read this post about cut!

Printing columns ('fields') n to m (inclusive) from a file:

    cut -d [delimiter] -f n-m filename

Thus, removing the first n-1 fields from a file:

    cut -d [delimiter] -f n- filename

[delimiter] is automatically a …