Created
March 15, 2015 14:13
-
-
Save duyet/2e7d5c57312f10b9e54d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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