CMIS 325 Day 11 Name: ________________________________ Use sed Use you the rime file for these: Each is independant of the others. Show the sed command that accomplishes the task. --delete punctuation --double each space --double each space and add two leading spaces at beginning of line (2 seds in a pipeline OK) --insert a space after each character. Hint: & --parenthesize each word --parenthesize each word and remove spaces --swap the first two words. Hint: tagging --swap the first and last words. Hint: 3 tags Using the new country.txt file, build up these seds in pipeline or multiple editing commands in one sed. At the end, all four changes are to be applied. they can probably be done in any order: --truncate the real numbers (remove decimal point and any digits to its right) --replace NULL with \N --replace comma with tab --delete apostrophes (hint: use " instead of ' as shell quote) Using the japan file, build up these seds in a pipeline or multiple editing commands in one sed: --apostrophes around the text fields (?can't use -r and tags together?) --comma as field separator last.txt is some output from the 'last' command. /var/log/wtmp is the binary file that maintains login information. What does the file command say the wtmp file is:_____________ What happens when you try to more or cat it:____________ last's output fields are: username, tty, hostname, timestamp on - off, (minutes). Use any commands and pipelines for these. How many different users logged on:_________ Which users had non-ftp logins:_______________ When did the system reboot:_______________________________ SKIP:What was the longest login and who was it:______________ SKIP:Who logged in the most number of times and how many times was that:_________ hint: use the awk frequency count SKIP:What was the busiest day (most number of logins) and how many was that:________ hint: awk frequency count but change $1 (first field) to $0 meaning the entire line