File Processing Commands Worksheet
Case Study 9-2: Lifestyle Changes for Weight Loss Sally is a 43-year-old mother of two who has gained 50 pounds over the past five years. She is 64 inches tall and weighs 180 pounds with a BMI of 30.8. Her waist circumference is 37 inches. She acknowledge
June 20, 2020
global health promotion
June 20, 2020

File Processing Commands Worksheet

File Processing Commands Worksheet – 15 Marks – Week 4 1. How do you know how many number of users currently logged into the system? (Not considering if any user is logged more than one time) (1) A. who | uniq | sort | wc -l B. who | cut -d' ' –f1 | uniq | wc -l C. who | sort | uniq | wc -l D. who | cut -d' ' –f1 | sort -u | wc -l E. who | cut -d' ' –f1 | uniq -d | wc -l Ans: 2. Create a file “employees.txt” using vi editor or pico. (The file will have 6 fields, ID, Name, Designation, Dept, D.O.B, Salary separated by pipe) Enter these lines in the file and save it. 2133|charles smith |Manager|sales|12/12/56| 90000 9576|Rob Thomson|director |production|03/12/50|130000 5778|David Blake |General Manager|marketing |04/19/43| 85000 2765|Rick Martin|director|personnel |05/11/47|120000 (Use cut command for the following questions A,B) (in each one mark, ½ is for the command and ½ for the output) A. Display the person's name, his designation and salary in the above file. Show the command and output Ans: B: Display first 20 characters on each line in the above file. Show the command and output Ans:

 

Looking for a Similar Assignment? Order now and Get 20% Discount!
Use Code; GET20

WhatsApp Chat with us on Whatsapp