Question: UNIX BASH Scripting Hello, I'm just starting out and this is literally my first shell script. I'm using vi and can create and save and
UNIX BASH Scripting
Hello, I'm just starting out and this is literally my first shell script. I'm using vi and can create and save and implement the file, but really not sure what it's supposed to look like. Any help will get a thumbs up.
Write a shell script called fileInfo.sh that: - Accepts a filename as an argument. If a filename is not given, exit with an error message. - Outputs the type of the contents of the file (hint: use file, but you may need one of the parameters) - Outputs first line and the last line of the file.

My script so far. It doesn't work. Throws a syntax error, near unexpected token 'newline"
I don't know how to debug this. help.

Write a shell script called fileInfo.sh that: - Accepts a filename as an argument. If a filename is not given, exit with an error message. Outputs the type of the contents of the file (hint: use file, but you may need one of the parameters) Outputs first line and the last line of the file. Example output: $ ./fileInfo.sh Usage: /fileInfo.sh
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
