Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Hello
I would like to know how can I get the list of pending jobs in a given printer queue with ruby/rails.
Thanks
regards
To start with, what operating system is this?
I am assuming this is for linux.
I should embed a system call to lpq and getting the output, parsing it with ruby and inserting it into a collection.
something like:
jobs = lpq.split '\n'
the backticks turn the command into a returning string, then split it on line breaks and parse out the jobs.
