If statment

#!/bin/bash

#> error and success are two files
# error="No pages of output"
# success="Output written on"

if grep "No pages of output" error > /dev/null; then
  echo "We found 'No pages of output' in error"
fi
#> out puts the echo above

if grep "written on" success > /dev/null; then
  echo "We found 'Output written on' in success"
fi

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.