Help needed Urgently... Thanks in advance

You have a file called /opt/test/input.txt with the following information:

    man_aa_bld_100.410.040_CMD 08/14/2008  23:29:21 08/14/2008  23:31:10 SU 5339491/1
    man_aa_bld_100.410.050_CMD 08/14/2008  23:29:21 08/14/2008  23:31:11 SU 5339491/1
    man_aa_bld_100.410.060_CMD 08/14/2008  23:29:21 08/14/2008  23:31:14 SU 5339491/1
    man_aa_pro_100.425.000_CMD -----                -----                                          AC 5339491/0
    man_aa_pro_100.430.000_CMD -----                -----                                          AC 5339491/0
    man_aa_bld_100.410.070_CMD 08/14/2008  23:29:21 08/14/2008  23:30:23 SU 5339491/1
    man_aa_bld_100.410.080_CMD 08/14/2008  23:29:21 08/14/2008  23:30:27 SU 5339491/1
    man_aa_bld_100.410.090_CMD 08/14/2008  23:29:22 08/14/2008  23:31:05 SU 5339491/1
    man_aa_pro_100.420.000_CMD 08/14/2008  23:31:50 -----                             RU 5339491/1

Write the instruction to create a file called /opt/text/output.txt with the following results:

sendevent -E CHANGE_STATUS -s SUCCESS -P 1 -J man_aa_pro_100.425.000_CMD
  sendevent -E CHANGE_STATUS -s SUCCESS -P 1 -J man_aa_pro_100.425.000_CMD

Please note that from input.txt you have to take the rows with status AC (Lines in blue).

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

---------- Post updated at 03:10 PM ---------- Previous update was at 03:05 PM ----------

nawk '$(NF-1)=="AC" {printf("sendevent -E CHANGE_STATUS -s SUCCESS -P 1 -J %s\n", $1)}' /opt/test/input.txt > /opt/text/output.txt

THanks a Bunch Dude...

Hello,

Per our forum rules, all threads must have a descriptive subject text. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

The reason for this is that nearly 95% of all visitors to this site come here because they are referred by a search engine. In order for future searches on your post (with answers) to work well, the subject field must be something useful and related to the problem!

In addition, current forum users who are kind enough to answer questions should be able to understand the essence of your query at first glance.

So, as a benefit and courtesy to current and future knowledge seekers, please be careful with your subject text. You might receive a forum infraction if you don't pay attention to this.

Thank you.

The UNIX and Linux Forums