Question

please write an awk script to display from the sixth to ninth records in “loginfile.” Please...

please write an awk script to display from the sixth to ninth records in “loginfile.” Please test your script to make sure the script displays the following information: ics325fa1531 pts/5 10.10.76.114 Thu Oct 15 19:38 - 19:38 (00:00) ics325fa1531 pts/4 10.10.76.114 Thu Oct 15 19:37 - 19:39 (00:02) ics325fa1524 pts/3 10.10.76.100 Thu Oct 15 19:25 - 21:50 (02:24) ics325fa1524 pts/3 10.10.76.100 Thu Oct 15 19:22 - 19:25 (00:03)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

awk 'BEGIN {RS="";FS="\n"} {print $6,$7,$8,$9}' data.log

Explanation:
--------------
Here in above statement we use BEGIN keyword, which is used when we want to read file line by line.
Then we are specifying that, print all lines in next lines using \n character.
Then we are specifying to print only 6 to 9 lines.

Add a comment
Know the answer?
Add Answer to:
please write an awk script to display from the sixth to ninth records in “loginfile.” Please...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • i dint think the answer is corect. Catistics, E... X - JJ Prepare a stem-and-leaf display...

    i dint think the answer is corect. Catistics, E... X - JJ Prepare a stem-and-leaf display for these data. Arrange the leaves for each stem in increasing order. Prepare a split stem-and-leaf display for these data. Split each stem into two parts. The first part should contain the contain the leaves 5 through 9. 29 The following data give the one-way commuting times (in minutes) from home to work for a random sample of 50 23 17 34 26 18...

  • Most system administrators would like to know the utilization of their systems by their users. On...

    Most system administrators would like to know the utilization of their systems by their users. On a Linux system, each user's login records are normally stored in the binary file /var/log/wtmp. The login records in this binary file can not be viewed or edited directly using normal Linux text commands like 'less', 'cat', etc. The 'last' command is often used to display the login records stored in this file in a human readable form. Please check the man page of...

  • Question Completion Status: Over a 3 month period, a researcher records the number of days that...

    Question Completion Status: Over a 3 month period, a researcher records the number of days that members of a local Gym use the gym facilites. You collect the following data from a sample of members at the Gym Below is the number of days each person made it to the gym. 2 16 30 39 15 29 37 55 15 30 38 60 14 29 36 51 18 31 40 19 31 40 19 32 41 21 32 41 25...

  • Graph the mean winning margins for years 2005 - 2007 for women's NCAA Basketball tournaments. Is...

    Graph the mean winning margins for years 2005 - 2007 for women's NCAA Basketball tournaments. Is there a trend over time? 2005 Winning Margin 34 3 1 8 26 17 22 32 35 3 22 10 22 31 3 21 51 12 2 20 5 25 10 41 32 16 23 10 33 48 12 37 2006 Winning Margin 24 12 13 21 4 5 15 48 23 17 5 19 24 18 10 41 69 2 10 19 6...

  • please determine the output in a simple form #include <stdio.h> 2 3 //Item 02 4 int...

    please determine the output in a simple form #include <stdio.h> 2 3 //Item 02 4 int main() 5 6 7 8 9 10 int i for( i = 0 ; i < 5 ; i++ ) ifo 12 13 14 15 16 17 18 19 20 21 printf("A" printf("B"); if i > 2 ) printf("C"); 23 24 25 26 27 28 29 30 31 32 if( i 3) printf( "D") if>4) printf("E 34 35 36 37 38 39 40 41...

  • It appears that sons of fathers who display low self-esteem tend to develop low self-esteem as...

    It appears that sons of fathers who display low self-esteem tend to develop low self-esteem as well. Kuya conducted a study to test this hypothesis, since he is pretty sure that there must be a difference between the two groups, with sons having higher self-esteem than their fathers. He measured the self-esteem of the fathers and their sons using the Fearful Insecure Neurotic Emotional (FINE) test. The higher the score, the lower is the self-esteem. Is there a significant difference?...

  • These are my instructions: Your data should have been read in from the data file and stored into ...

    These are my instructions: Your data should have been read in from the data file and stored into an array. Next you need to calculate the following and display in a single Message box: Average score Highest score Lowest score Mode of the scores Your program should be written using methods and should be well documented internally and externally. Your output should be displayed using Message boxes. This is the .text file to use with the instructions: 20 21 22...

  • Please show how you did this in excel. :13-19 Every home football game for the past...

    Please show how you did this in excel. :13-19 Every home football game for the past eight years at Eastern State University has been sold out. The revenues from ticket sales are significant, but the sale of food, beverages, and souvenirs has contrib- uted greatly to the overall profitability of the football program. One particular souvenir is the football pro- gram for each game. The number of programs sold at each game is described by the following probabil- ity distribution:...

  • Name Chem 110 Oct 15, 2019 Write the formulas from the names of compounds 1. sulfur...

    Name Chem 110 Oct 15, 2019 Write the formulas from the names of compounds 1. sulfur dioxide 2. manganese (IV) oxide 3. sodium thiocyanate N aSON 4. lithium phosphate 5. nickel (II) nitrate Ni (NO2)2 6. ammonium chloride 7. potassium chlorate ka 8. beryllium periodate 9. cadmium chromate Cd Croa 10. sodium permanganate 11. iron (II) hydroxide Fe(OH)2 12. trinitrogen pentoxide 13. strontium nitride SraN₂ 14. magnesium bromate 15. sodium thiosulfate Na.S.O. 16. chlorous acid 17. sodium hypobromite Brno 18....

  • What is the major product for each reaction? Could you please draw the mechanism? JAN FEB...

    What is the major product for each reaction? Could you please draw the mechanism? JAN FEB MAR APR MAY 01 02 03 04 05 06 07 08 09 10 11 12 13 JUN 14 15 16 JUL AUG SEP O 17 18 19 20 21 22 23 24 25

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT