mirror of
https://github.com/eddyem/lectures.git
synced 2026-03-20 08:41:01 +03:00
add 3 lectures for SFedU
This commit is contained in:
15
Komp_obr_SFedU/Materials4Pract/01/if
Executable file
15
Komp_obr_SFedU/Materials4Pract/01/if
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Enter value"
|
||||
read val
|
||||
if [ $val -gt 100 ]; then
|
||||
echo "value $val greater than 100";
|
||||
else
|
||||
echo "value $val less than 100";
|
||||
fi
|
||||
|
||||
echo "Enter filename"
|
||||
read f
|
||||
[ -d $f ] && echo "$f is a directory"
|
||||
[ -f $f ] && echo "$f is a file"
|
||||
[ ! -e $f ] && echo "Not exists"
|
||||
Reference in New Issue
Block a user