Introduction to Linux and Programming, End Term
What will be the output of the command
sort -n file1.txt file2.txt | awk '!seen[$1]++ {print $1, $2, $3}'given the following content of file1.txt and file2.txt?
| file1.txt | file2.txt |
|---|---|
| 101 John Doe | 102 Michael Johnson |
| 103 Jane Smith | 103 Jane Smith |
| 105 Emma Brown | 106 Lily Evans |
| 107 William Harris | 107 William Harris |
| 109 Oliver Lewis | 110 Sophia Turner |
What will be the output of the command sort -n file1.txt file2.txt | awk '!seen[$1]++ {print $1, $2, $3}' given the following content of file1.txt and file2.txt? | <u>file1.txt</u> | <u>file2.txt</u> | |---|---| | 101 John Doe | 102 Michael Johnson | | 103 Jane Smith | 103 Jane Smith | | 105 Emma Brown | 106 Lily Evans | | 107 William Harris | 107 William Harris | | 109 Oliver Lewis | 110 Sophia Turner | Schedule the script /home/user/backup.sh to meet the following requirements\ 1\. The job should run at the 2nd minute of every hour, but only during weekdays (Monday to Friday).\ 2\. Additionally, the job must not run during the first and last days of each month.\ 3\. It should execute a script located at /home/user/backup.sh and log the output to\ /var/log/backup.log (append mode).\ Which of the following exact **crontab** entry is used to schedule this job. #!/usr/bin/awk -f { for (i = 1; i <= NF; i++) { word = tolower($i) gsub(/[^a-z]/, "", word) if (word != "") freq[word]++ } } END { for (word in freq) { printf "%-15s %d\n", word, freq[word] } } What is the primary purpose of this AWK script?