[Solved] Cancelling print jobs for an entire month


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers [Solved] Cancelling print jobs for an entire month
# 8  
Old 10-27-2011
ok thanks.. i'll check that. Thanks man!

---------- Post updated at 10:36 AM ---------- Previous update was at 10:32 AM ----------

I am totally new to HPUX. Though I won't ask you to teach me abt SAM, can I send a personal message for quick answers?
# 9  
Old 10-27-2011
I cant do much more for I have not queue issue (all are empty) if you wish us to help you through command line to get rid of the jobs you will have to send different output (correct hard copy) of command such as the lpstat you used so we can figure out the best way for you to try... Don't forget to use code tags...


PM are against the rules (for technical questions) for the forum is for the good of all...
about SAM, are you in front of a graphical interface?
# 10  
Old 10-27-2011
Quote:
Originally Posted by satish51392111
can I send a personal message for quick answers?
Very nice of you to ask anyone at all, most don't bother. Generally not a good idea, often a rules violation, and usually slower, not faster anyway...
# 11  
Old 10-27-2011
Ok abt the PMs.
Yes, I am in front of a GUI.
This is the output:
Code:
# lpstat -oLBNDUIP061 | grep -i Sep
LBNDUIP061-9670     jdeb7333       priority 0  Sep  1 09:22 from nlnwgu03
LBNDUIP061-9671     jdeb7333       priority 0  Sep  1 09:22 from nlnwgu03
LBNDUIP061-9672     jdeb7333       priority 0  Sep  1 09:23 from nlnwgu03
LBNDUIP061-9673     jdeb7333       priority 0  Sep  1 09:24 from nlnwgu03
LBNDUIP061-9674     jdeb7333       priority 0  Sep  1 09:27 from nlnwgu03
LBNDUIP061-9676     jdeb7333       priority 0  Sep  1 09:27 from nlnwgu03
LBNDUIP061-358      jdeb7333       priority 0  Sep  1 15:09 from nlnwgu03
LBNDUIP061-361      jdeb7333       priority 0  Sep  1 15:11 from nlnwgu03
.
.
.

These are some of the jobs for Sep

Last edited by vbe; 10-27-2011 at 12:48 PM.. Reason: Code tags!!!
# 12  
Old 10-27-2011
Are all the request you want to remove from the same user? And hopefully not the same for the one you would like to keep?
# 13  
Old 10-27-2011
There are in total 10 queues. All these have few jobs except one. The queue LBNDUIP061-8487 has hundreds of jobs. I have to keep the recent week's jobs of this queue and cancel rest. Can I using SAM?
# 14  
Old 10-27-2011
I dont know if these work can you try?
Code:
cancel $(lpstat -oLBNDUIP061 | grep -i Sep | awk '{print $1}' )
# else
lpstat -oLBNDUIP061 | grep -i Sep | awk '{print $1}' | cancel -

If not we are for a loop...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print text between 2 strings for the entire file

hey guys, for the following output: starting open open close close starting close starting open close close starting open open close open (2 Replies)
Discussion started by: boaz733
2 Replies

2. Shell Programming and Scripting

Print only matched string instead of entire line

Hi, I have a file whose lines are something like Tchampionspsq^@~^@^^^A^@^@^@^A^A^Aÿð^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^?ð^@^@^@^@^@^@^@?ð^@^@^@^@^@^@pppsq^@~^@#@^@^@^@^@^@^Hw^H^@^@^@^K^@^@^@^@xp^At^@^FTtime2psq^@ ~^@^^^A^@^@^@^B^A I need to extract all words matching T*psq from the file. Thing is... (4 Replies)
Discussion started by: shekhar2010us
4 Replies

3. UNIX for Advanced & Expert Users

[Solved] remove all print jobs from a print queue

Hello, Sometimes i need to clear all the jobs of a print queue and it is really annoying to cancel one by one. Is there a way to cancel all print jobs for a specific print queue with a single command instead of cancelling them one by one? My AIX system is 5.3 Thank you for your attention (2 Replies)
Discussion started by: omonoiatis9
2 Replies

4. UNIX for Dummies Questions & Answers

Print entire columns into new file

Dear All, I am having trouble obtaining the 3 outfiles (as shown below) from a single input file. Could you please help?? INPUT: filename a b c 1 4 2 3 3 2 4 2 7 OUTPUT: outfile1 (a.dat) 1 (2 Replies)
Discussion started by: chen.xiao.po
2 Replies

5. UNIX for Dummies Questions & Answers

print previous month (current month minus 1) with Solaris date and ksh

Hi folks month=`date +%m`gives current month Howto print previous month (current month minus 1) with Solaris date and ksh (7 Replies)
Discussion started by: slashdotweenie
7 Replies

6. Shell Programming and Scripting

Print entire line based on value in a column

Friends, File1.txt abc|0|xyz 123|129|opq def|0|678 890|pqw|sdf How do I print the entire line where second column has value is 0? Expected Result: abc|0|xyz def|0|678 Thanks, Prashant ---------- Post updated at 02:14 PM ---------- Previous update was at 02:06 PM ---------- ... (1 Reply)
Discussion started by: ppat7046
1 Replies

7. Shell Programming and Scripting

Print the entire line if second field has value P

Friends, I have .txt file with 3 millions of rows. File1.txt ABC1|A|ABCD1|XYZ1 ABC2|P|ABCD2|XYZ2 ABC3|A|ABCD3|XYZ3 ABC4|P|ABCD4|XYZ4 If second field has value P then print the entire line. Thanks in advance for your help, Prashant (4 Replies)
Discussion started by: ppat7046
4 Replies

8. Shell Programming and Scripting

Grep for a pattern and print entire record

Hi friends, This is my very first post on forum, so kindly excuse if my doubts are found too silly. I am trying to automate a piece of routine work and this is where I am stuck at the moment-I need to grep a particular ID through a file containing many records(which start with <LRECORD> and end... (6 Replies)
Discussion started by: faiz1985
6 Replies

9. Shell Programming and Scripting

print entire line after if lookup

I hope this is a basic question. I have a file with a bunch of strings in each line (and the string number is variable). What I want to do is a simple if command and then print the entire line. something like awk '{if ($3=="yes") print $1,$2,$3,...$X }' infile > outfile Can someone... (1 Reply)
Discussion started by: dcfargo
1 Replies

10. Shell Programming and Scripting

End of Month - Cron Jobs

I am running AIX 5.3 with the default shell as ksh. I would like to know how to run a cron job on this system the last calendar day of the month. I found an example, but, I'm not sure if it will work with AIX and ksh... 02 16 * * * && /home/user/job-eom.kshI also need to be able to run a... (2 Replies)
Discussion started by: jthompson333
2 Replies
Login or Register to Ask a Question