Skip to content

Instantly share code, notes, and snippets.

@duyet
Created March 15, 2015 14:13
Show Gist options
  • Save duyet/2e7d5c57312f10b9e54d to your computer and use it in GitHub Desktop.
Save duyet/2e7d5c57312f10b9e54d to your computer and use it in GitHub Desktop.
#!/bin/bash
# Van-Duyet Le <[email protected]>
# Homepage: http://lvduit.com
maindir="."
read -p "File 1: " f1
read -p "File 2: " f2
if [ -f ./$f1 ] && [ -f ./$f2 ]; then
echo "Exists!";
else
while dir in *; do
if [[ -d $dir ]]; then
if [ -f $dir/$f1 ] && [ -f $dir/$f2 ]
then
echo "Exist in " $dir;
fi
fi
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment