3 ms·
Depends on how complex the expected operations are. I think awk is absolutely essential for dealing with things like logfiles. Do you have a reason against usin
by LiveTheDream 15y ago
Depends on how complex the expected operations are. I think awk is absolutely essential for dealing with things like logfiles. Do you have a reason against using sqlite[1]? That works just fine in the console, doesn't need a server. You could still use awk with it, technically. For example:
bash..$ sqlite3 books.sqlite
sqlite$ create table books ( title varchar(128), author varchar(128) );
sqlite$ insert into books (title, author) values ("Snow Crash", "Neal Stephenson");
sqlite$ .quit
bash..$ echo "select * from books;" | sqlite3 books.sqlite
Snow Crash|Neal Stephenson
[1] http://sqlite.org/ http://sqlite.org/
- adamjernst 15y agoYou don't even need to pipe the command in; just put it as the second argument after the database file. $ sqlite3 books.sqlite "select * from books"
- LiveTheDream 15y agoThanks for the tip