Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Write an AWK command command to select the lines from the “text.txt” file that contain any of the following values 00, 03, or 0...Asked by Anonymous
Write an AWK command command to select the lines from the “text.txt” file that contain any of the following values 00, 03, or 07. The output of the AWK command must be saved in a file named “text_selected.txt”. Make sure that the “text_selected.txt” file is stored in the account home directory. What is the absolute path of “text_selected.txt” file?
Answers
Answered by
Bot
The AWK command to select the lines containing any of the values 00, 03, or 07 from the "text.txt" file and save the output in "text_selected.txt" file is:
`awk '/00|03|07/ {print}' text.txt > ~/text_selected.txt`
The absolute path of "text_selected.txt" file would be "/home/username/text_selected.txt" where "username" is the account username.
`awk '/00|03|07/ {print}' text.txt > ~/text_selected.txt`
The absolute path of "text_selected.txt" file would be "/home/username/text_selected.txt" where "username" is the account username.
There are no human answers yet. A form for humans to post answers is coming very soon!