How can i use condition to check if filename is really exist


Problem: In bash script, there can be 2 or 3 inputs those are -f, filename, and -l.(-l is an optional)

If there is a -f then file name must be followed ex) -l -f filename, -f filename, or -f filename -l.  How can i use condition to check if filename is actually exists if not then exit with code 2.  

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: How can i use condition to check if filename is really exist
Reference No:- TGS03253330

Expected delivery within 24 Hours