Close
AlgoliaLogoLight
Close full mode
logo

Bash script

Git RepositoryEdit on Github

If statement

if [ -f "README.md" ]
then
echo "README.md exists"
elif [ -f "CONTRIBUTING.md" ]
then
echo "CONTRIBUTING.md exists"
else
echo "Files not found"
fi

If single line statement

if [ -f "/usr/bin/wine" ]; then export WINEARCH=win32; fi
if ps aux | grep some_proces[s] > /tmp/test.txt; then echo 1; else echo 0; fi
[ -f "/usr/bin/wine" ] && export WINEARCH=win32
Loading comments...