Question: Question ( Shell Scripting ) In this exam, you will read a text from a text file and display the content on screen. The content

Question (Shell Scripting)
In this exam, you will read a text from a text file and display the content on screen. The content of the file
includes only three ASCII characters: 'x' and 'O' characters, and a delimiter '|' with no spaces between them.
After reading the file, the user will check if the rows, columns, or diagonals have the same symbols. The file
will consist of 9 symbols, three in each line figure 1.
x|x|O
O|x|O
x|O|x
Figure 1: Sample of the content of a text file printed on screen
Requirements:
Accept the player's name as input.
Print the player's name on the screen and also to an output file.
Accept the name of a text file as input, ensuring its existence.
Read the entire content of the text file.
Print the content of the text file on the screen.
Display the current time, including hours, minutes, and seconds on screen.
Write the current time to the content of the output file.
Check if the symbols in any row are the same; if so, print 'Symbols in at least one row are the same' on
the screen. Otherwise, print 'No match across rows'
Check if the symbols in any column are the same; if so, print 'Symbols in at least one column are the same'
on the screen. Otherwise, print 'No match across columns
Check if the symbols in the forward diagonal ('/') backward diagonal ('???') are the same; if so, print 'A
match across at least one diagonal' on the screen. Otherwise, print 'No match across diagonals"
 Question (Shell Scripting) In this exam, you will read a text

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!