#!/bin/bash exitfunc() { string(this is a function that can print a string in the terminal) if the string printed is what I expected exit 0 else exit 1 } exitfunc
Basically, I want to write a test.sh to test if the string command get the right result. If right, exit 0, else exit 1. So, I need to search some part of the string to check if it is expected or not. How to check the particular string in terminal?
Thanks.
Aucun commentaire:
Enregistrer un commentaire