Monitoring command output
Running a background job at work and wanted to monitor this status.
A colleague pointed me towards a nifty tool called watch
The following will repeat the command every 2 seconds by default and display the output:
watch "echo 'select message from execution_log_entries order by created_at desc limit 50' | psql -d atlas2_train"
-Matt
Written by Matthew Riddle
Related protips
1 Response
You can make it more awesome!
psql
has the –c 'your sql' so you can cut out the 'echo |' as well - @LukeR
watch
has the -d switch to highlight changes with each screen refresh. - @dhodges
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Command line
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#