title: Linux Bash - Date Format
body: <p>My date format is yyyy-mm-dd-hh:mm:ss
  How do I check my input?</p>
  
  <p>It should be something like this:</p>
  
  <pre><code>#!/bin/bash
  
  read -p "Date (format yy-mm-dd-HH-MM-SS): " input
  
  check=$(date +"%Y-%m-%d-%H:%M:%S")
  
  if [ $input -eq $check ]; do
  
       echo "Right!"
  
  else
       echo "False!"
  
  fi
  </code></pre>
  
  <p>But that doesn't check the date It compares my input with the real date.</p>
  
  <p>Best Regards
  Vince</p>