Unfortunately a database of mine crashed. Fortunately, I have log files with the data. I need the timestamp and the data.
The lines in the log files look something like this:
####### collect $TIMESTAMP ######### *GARBAGE *GARBAGE *GARBAGE $ID:=$DATASET *GARBAGE
It's been years since I've done anything more than a simple grep. I wasn't even sure which grep I needed... egrep? fgrep? grep?
I can use this regex for the timestamp line:
```bash
I can use this regex for the dataset line:
```bash
But how can I put them together? It's probably of no surpise that I can use the '|' operator like so:
```bash
If you made it this far, you should follow me on Twitter.
-JP
Want to test-drive Bitcoin without any risk? Check out my bitcoin wallet Coinbolt. It includes test coins for free.
comments powered by Disqus