Portál AbcLinuxu, 21. prosince 2025 11:42
help test , popřípadě man bash a klíčové slovo test
#!/bin/bash
echo "This scripts checks the existence of the messages file."
echo "Checking..."
if [ -f /var/log/messages ]
then
echo "/var/log/messages exists."
fi
echo
echo "...done."
A trosku zjednodusime s identickym vysledkem #!/bin/bash echo -e "This scripts checks the existence of the messages file.\nChecking..." [ -f /var/log/messages ] && echo "/var/log/messages exists." echo -e "\n...done."
Prozkoumej si to za domaci ukol 
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.