shell logical and for file existence
#!/bin/bash
if [ -e x.txt ]
then
echo "ok"
else
echo "nok"
fiFILE=/etc/resolv.conf
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "$FILE does not exist."
fi
if [[ -f $FILE1 ]] && [[ -f $FILE2 ]]; then
echo "OK"
fi
Also in C++:
- bash remove duplicate lines from a file
- remove iptables rule
- powershell delete local user
- git get remote branch
- github command for adding all files
- bitnami wordpress folder
- vscode install commandline
- Ubuntu fix broken package
- pip install wikipedia
- rails install devise
- checking service status in linux
- git pull from differemt server
- how to open directory in linux using command
- You must install graphviz to plot tree mac
- uzip bash: -c: line 0: unexpected EOF while looking for matching `"'
- laravel installer
- set head of branch at specific commit
- find folder linux
- whereis supervisord.conf ?
- nvm github
- npm install webpack server
- linux disk usage
- pod reference github
- ubuntu subsystem windows 10 from cmd prompt