Need bash script help please

Dear community, I am getting stuck trying to export a file check to a .CSV as either a pass or fail.

Example:

#!/bin/bash
File=/etc/login.defs
Grep -i minlen

If the grep for minlen is equal to 15 I would like it to export to a .csv file as pass but if it does not equal 15 I would like it to export to .csv as fail. I also get stuck overwriting the file since I will have hundreds of checks within this script. Any help much appreciated!!

Well, Lukej21x.

Welcome.

You are going to need to put more effort into your work than what you have provided, especially since you seem to not even know that your code is case sensitive and there is no "Grep" command in Unix/Linux only "grep" (unless of course you are some wiz who is creating such aliases for command, which I doubt.)

Take a look a basic shell scripting and write your first "Hello World" bash script first and think about how to use basic commands in bash.

Post back when you do your own basic homework first.

Thanks.

Welcome to the forums Lukej21x

Can you share the entire or a major part of the script ?
How are you writing to file(s) using those checks ?

Regards
Peasant.