I am using below shell code in linux i want it to make it in Java.I want to call this command in JAVA
mailq | grep -B1 -i temporarily | grep -iv deferred | \
egrep -i 'jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec' | \
awk -F" " '{print $1}' | awk '{print substr($0,10,14)}'
mailq command shows the queued mail messages with there respective Id and there errors . Like in command above i am looking for messages with temporarily disabled message in it and taking the above message where its id is present in **09089 like this checking the month and than printing the last 5 characters of that id
man mailqand gotNo manual entry for mailq. I know I can google it, but easing the work of those wanting to help can be a good idea... Here, you expect people to both know well mailq, awk, and Java (not JAVA, BTW). I am sure there are plenty of those people, but are they reading this question?