tail -f filename should definitely make the list, essential for watching what's appended to log files in real time.
one benefit to less +F is that you can cancel the following and read normally in less.
31–40 of 67 posts
tail -f filename should definitely make the list, essential for watching what's appended to log files in real time.
one benefit to less +F is that you can cancel the following and read normally in less.
With the files in the example (order.out.log, order.in.log), to join every record on it's id, you would do something like:
$ join -j 2 order.out.log order.in.log
111, 8:22:19 1, Patterns of Enterprise Architecture, Kindle edition, 39.99 8:22:20 Order Complete
112, 8:23:45 1, Joy of Clojure, Hardcover, 29.99 8:23:50 Order sent to fulfillment
113, 8:24:19 -1, Patterns of Enterprise Architecture, Kindle edition, 39.99 8:24:20 Refund sent to processingEarlier quoted context omitted.
[ EDIT - Two replies as original post had been edited by the time I posted the first. ] > and as a sidenote, something i only found recently, but which is quite useful, a logical AND with egrep looks like > > egrep 'Hardcover. Kindle' That's not a true logical AND since it won't pick up an entry with the text "Kindle Hardcover". Only entries with the word "Hardcover" eventually followed by "Kindle". To cover both cas…
How about: grep Hardcover | grep Kindle
sed -n '/Kindle/{/Hardcover/p}'I think it's obligatory that someone writes 'strace' in threads about articles like this, so here goes. strace is fantastic for debugging certain categories of problem.
I was expecting to see the first comment in here complaining about his use of 'cat', as in all of the examples his second argument could've easily taken a filename argument.. sort order.* is surely more elegant than cat order.* | sort which is fair enough, however, as it happens, i generally do end up using 'cat' in the way he's used it.. for such small jobs nobody can be genuinely worried about the overhead, and it…
how do I execute the out put of something like this: grep -i 'pattern' file | awk '{print $5}' | sed 's/^/cmd/g' I end up sending to a file, chmod, then run it at the shell.
In bash... $(grep -i 'pattern' file | awk '{print $5}' | sed 's/^/cmd/g') ? Or surround in backticks `command which outputs text you want to run as a command` I prefer $() as they nest better. Or have I misunderstood your question?
Earlier quoted context omitted.
Perhaps because sending GiBs through read(2) and write(2) unnecessarily isn't a NOP?
Who said NOPs are free? NOPs still take at least one clock cycle.