title: How to remove all data from a file before a line containing string by passing variable in linux
body: <p>I am trying to trim the data above the line from a file, where line containing some string by passing variable to it </p>
  
  <pre><code>varfile=$(cat variable.txt)
  echo "$varfile"
  if [ -z "$varfile" ]; then
      echo "null"
  else
      echo "data"
  sed "1,/$varfile/d" fileee.txt
  fi
  </code></pre>
  
  <p>Here I am taking a string from variable.txt file and trying to find that text in fileee.txt file and removing all the data above the line</p>
  
  <p>EX: variable.txt has 3
  I am finding 3 in  fileee.txt and removing data above three</p>
  
  <pre><code>INPUT:
  1
  2
  3
  4
  OUTPUT:
  3
  4
  </code></pre>