I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Hello,
I had posted earlier about printing fields using AWK, but now I have a slightly different problem. I have text files in the format:
1*2,3,4,5
and wish to print the first, third, and fifth fields, including the asterisk and commas. In other words, after filtering it should look... (1 Reply)
from this input
WEBELSOLAR,29122009,1:1
WIPRO,15062010,2:3
ZANDUREALT,18012007,1:3
i want output as
WEBELSOLAR,20091229,1:1
WIPRO,20100615,2:3
ZANDUREALT,20070118,1:3
basically input is in ddmmyyyy format and i was to convert it to yyyymmdd format (1 Reply)
Dear All,
I would like to add values of a field, if the lines match in a certain field. Then I would like to divide the sum though the number of lines that have a matched field. This is the Input:
Input:
Test1 5
Test1 10
Test2 2
Test2 5
Test2 13
Test3 4
Output:
Test1 7.5
Test1 7.5... (6 Replies)
When parsing multiple fields in a file using AWK, how do you group by one of the fields and parse by delimiters?
to clarify
If a file had
tom | 223-2222-4444 , randofield
ivan | 123-2422-4444 , random filed
... | and , are the delimiters ...
How would you group by the social security... (4 Replies)
Hi,
Is there any short method to print from a particular field till another filed using awk?
Example File:
File1
====
1|2|acv|vbc|......|100|342
2|3|afg|nhj|.......|100|346
Expected output:
File2
====
acv|vbc|.....|100
afg|nhj|.....|100 (8 Replies)
i have file as with the below content
aaa.bbb.cc.dd
aaa.fff.bb
yyyyy.rrrrr.ggggg.iii
wwww.w.r.ty
i want the o/p as below
dd
bb
iii
ty
but i dont want to use awk. is there any other way to do this ? (5 Replies)
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Hi All,
I am trying to insert two columns in the following text. I tried awk but failed to achieve. Highly appreciate your help
DATETIME="28-Sep-2013;20:09:08;"
CONTROL="AB"
echo "Myfile.txt;11671;7824.90;2822.48"
The DATETIME will be inserted at the beginning and CONTROL will... (4 Replies)
Discussion started by: angshuman
4 Replies
LEARN ABOUT OPENSOLARIS
mailq
mailq(1) User Commands mailq(1)NAME
mailq - print the mail queue
SYNOPSIS
/usr/bin/mailq [-Ac] [-q subarg] [-v]
DESCRIPTION
The mailq utility displays a summary of the mail messages queued for future delivery.
The first line displayed for each mail message shows the internal identifier used on this host for the message, the size of the message in
bytes, the date and time the message was accepted into the queue, and the envelope sender of the message. The second line of the display
shows the error message that caused this message to be retained in the queue. This line will not be displayed if the message is being pro-
cessed for the first time.
The mailq utility used to be identical to sendmail -bp. Now it checks for the authorization attribute, solaris.mail.mailq. If the check for
the invoking user succeeds, sendmail -bp is executed with the remaining argument vector. Otherwise, an error message is printed. This
authorization attribute is by default enabled for all users. It can be disabled by modifying the Basic Solaris User entry in prof_attr(4).
OPTIONS
The following options are supported:
-Ac Like sendmail(1M), this flag tells mailq to use submit.cf rather than sendmail.cf even if the operation mode does
not indicate an initial mail submission. This will result in the client queue /var/spool/clientmqueue being displayed
rather than the default server queue /var/spool/mqueue.
-qp[time] Similar to -qtime, except that instead of periodically forking a child to process the queue, sendmail forks a single per-
sistent child for each queue that alternates between processing the queue and sleeping. The sleep time is given as the
argument. The sleep time default is 1 second. The process will always sleep at least 5 seconds if the queue was empty in
the previous queue run.
-qf Processes saved messages in the queue once and does not fork(), but runs in the foreground.
-qG name Processes jobs in the queue group called name only.
-q[!]I substr Limits processed jobs to those containing substr as a substring of the queue id, or not when ! is specified.
-q[!]R substr Limits processed jobs to those containing substr as a substring of one of the recipients, or not when ! is specified.
-q[!]S substr Limits processed jobs to those containing substr as a substring of the sender, or not when ! is specified.
-v Prints verbose information. This adds the priority of the message and a single character indicator (+ or blank) indicating
whether a warning message has been sent on the first line of the message. Additionally, extra lines may be intermixed with
the recipients that indicate the "controlling user" information. This shows who will own any programs that are executed on
behalf of this message and the name of the alias this command is expanded from, if any.
EXIT STATUS
0 Successful completion.
>0 An error occurred.
FILES
/etc/security/prof_attr local source for execution profile attributes
/var/spool/mqueue default server queue
/var/spool/clientmqueue client queue
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsndmu |
+-----------------------------+-----------------------------+
SEE ALSO sendmail(1M), prof_attr(4), attributes(5)SunOS 5.11 10 Jul 2002 mailq(1)