#!/bin/bash

line="1234 abc xyz 5678"
word="1234"

if [[ "$line" == *"$word"* ]]
then
    echo "found"
else
    echo "not found"
fi