Tagged in

bash

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 ...

deletion and replacement of strings in bash

I try to record useful one-liners for future reference. I forgot to write down what this one does:

    mv $f ${f##START}.${f%%${f##START}}

This awkwardly-timed (time-zone troubles) blog post is atonement for my carelessness. Like all one-liners it looks complicated but is pretty simple. It does this:

    > f ...

putting a line in a filename (with sed)

"How can I cut a line from a file and paste the rest into a file whose title is the line I just cut?"

If you find yourself asking yourself this question with any degree of regularity, you may have issues. Luckily for you, the help you so desperately need ...