Welcome to the Linux Foundation Forum!
How to read a .gz and .log file using IF from script

HI,
I have a script that runs for zipped files but I don't know how to implement it to read unzipped files as well. Basically I want to use an IF statement but I don't know how to create the variables for zipped (.gz) and unzipped (.log) files.
Any help?
0
Comments
For log files:
https://www.howtogeek.com/709838/how-to-process-a-file-line-by-line-in-a-linux-bash-script/