#!/bin/bash FILE=/etc/motd FILE2=/var/run/motd function boot { apt-cache search apache | grep tomcat }; if [ -f $FILE ]; then echo el fichero $FILE existe else boot fi