Hi,
I am trying to do the following using AWK program.
1. Read the input data file
2. Parse the record and see if it contains errors
3. If the record contains errors, then write it into Reject file, else, write into usual output file or display it on the screen
Here is what I have done -... (6 Replies)
Well, it didn't take me long to get stumped again. I assure you that I'm not mentally deficient, just new to scripting.
So, here's the gist. I want to redirect output from awk based off of which branch of an if-else statement under which it falls.
#!/bin/bash
#some variables... (2 Replies)
Hi All,
Looking for a quick AWK script to output some differences between two files.
FILE1
device1 1.1.1.1 PINGS
device1 2.2.2.2 PINGS
FILE2
2862 SITE1 device1-prod 1.1.1.1 icmp - 0 ... (4 Replies)
Hi guys,
Basically, I have an END {print NR} statement in my awk script to count the number of records as I have concatenated multiple files. But instead of generating this total number of records to the same output data file. I want to put this in a separate control file using the same awk... (6 Replies)
:wall:
I am trying to do the following using awk (is that the best way?):
Read 2 files created from the output of df (say, on different days) and compare the entries using the 1st (FileSys) and 6th (Mount) fields to see if the size has changed. Output (at least), to a new file (some header... (2 Replies)
It seems like a common task, but I haven't been able to find the solution.
vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt
12122,Jane,Thomas
122,Janes,Does
123,Paul,Kite
**OUTPUT**
vitalfiltered.txt
12122,Jane,Thomas... (2 Replies)
I am using awk to read lines from a CSV file then put data into other files. These other files are named using the value of a certain column. Column 7 is a name such as "att" or "charter" . I want to end up with file names with the value of column 7 appended to them, like this:
... (5 Replies)
I have two large files (~250GB) that I am trying to remove the where GT: 0/0 or 1/1 or 2/2 for both files. I was going to use a bash with the below awk, which I think will find each line but how do I remove that line is that condition is found? Thank you :).
Input
20 60055 . A ... (4 Replies)
I am trying to output the matches between $1 of file1 to $3 of file2 into a new file match.
I am also wanting to output the mismatches between those same 2 files and fields to two separate new files called missing from file1 and missing from file2. The input files are tab-delimited, but the... (9 Replies)
The awk below when run using the contents of file, works great with the desired output of
expName
barcodeSampleInfo barcodedSamples
.
However, when the complete file is used (attached) I get different output. It looks like the same data is there but the ordering is off. Both data sets are... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT SUNOS
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.10 10 Jul 2002 mailq(1)