In this video we will see how File Test Operators are and why they are used
_________________________
Source code 👇👇👇
fileTest.sh👇👇👇👇
#!/bin/sh
file="/data/data/com.termux/files/home/mytest.sh"
if [ -r $file ]
then
echo "File has read access"
else
echo "File does not have read access"
fi
if [ -w $file ]
then
echo "File has write permission"
else
echo "File does not have write permission"
fi
if [ -x $file ]
then
echo "File has execute permission"
else
echo "File does not have execute permission"
fi
if [ -f $file ]
then
echo "File is an ordinary file"
else
echo "This is sepcial file"
fi
if [ -d $file ]
then
echo "File is a directory"
else
echo "This is not a directory"
fi
if [ -s $file ]
then
echo "File size is not zero"
else
echo "File size is zero"
fi
if [ -e $file ]
then
echo "File exists"
else
echo "File does not exist"
fi
myTest.sh👇👇👇
hello world!
Playlist
Bash Script: • Bash Script
Notification: https://youtube.com/playlist?list=
PLuCejQtGUOQS4pwMOQTnju5x-CpeBUjoJ
Recycler View: • Recycler View
Termux Tutorial: • Termux Tutorial
Android Studio Erorr Fix: • Android Studio Erorr Fix
AIDE-IDE-for-Android-Java/android studio Apps: • AIDE-IDE-for-Android-Java/android studio Apps
Learn Python For free Hindi/Urdu: • Learn Python For free Hindi/Urdu
If there is any problem, let us know in the comment box
Follow My Facebook Page:
/ 132319595615417
Join My Facebook Group
https://www.facebook.com/groups/94732...
On this page of the site you can watch the video online Shell Script Basic Programs - File Test Operators in Shell/Bash | Tutorial for Beginners #11 with a duration of hours minute second in good quality, which was uploaded by the user Code with Coffee 04 January 2023, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 1 viewers. Enjoy your viewing!