Problem 1: 1. Use the command "last -wi > myloginfile" to create a file "myloginfile" that shows all login information o

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem 1: 1. Use the command "last -wi > myloginfile" to create a file "myloginfile" that shows all login information o

Post by answerhappygod »

Problem 1 1 Use The Command Last Wi Myloginfile To Create A File Myloginfile That Shows All Login Information O 1
Problem 1 1 Use The Command Last Wi Myloginfile To Create A File Myloginfile That Shows All Login Information O 1 (141.77 KiB) Viewed 73 times
Problem 1: 1. Use the command "last -wi > myloginfile" to create a file "myloginfile" that shows all login information on the server since last time the log file was rolled over. Write an awk script, "myawkone", to determine how many lines in “myloginfile" that contain the string "cfs264". 2. Test your script to make sure it works properly and then verify your result using either grep or wc command. Problem 2: Please use the script file "awkc8" discussed in the handout as a template to complete the following tasks: 1. Create an awk script file, "myawkmax4", which will read 4 numbers, determine which number is the largest, and display it. 2. Your awk script, “myawkmax4”, must include a self-defined function with 4 parameters. No awk built-in functions are allowed to be used in your script. 3. Please test your script at least with the following testing cases: $ ./myawkmax4 3 1 5 4 The largest number is 5 $ ./myawkmax4 -3 -1 -2 -4 The largest number is -1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply