Shell Scripting Tutorial-31: Run Checks On Files

preview_player
Показать описание
In this tutorial you'll learn to check files by placing test conditions within square brackets.
Рекомендации по теме
Комментарии
Автор

Hello Madhur. Great tutorial - simple an clear. I hope you read this comments. Maybe you can suggest some scripting problems, some tasks for solving. That would great if after your videos you would say - write a script that It would motivate some people to play with what they learned.

sakad
Автор

Thanks Madhur, wonderful explanation. 

ramrakshasabani
Автор

what do u mean by charector special file

kannu
Автор

Hey Madhur, Thanx for the tutorials. I could'nt see the test statements in your sessions Madhur. And How can we check the different options?

MrMuditgoyal
Автор

Hello Madhur,

Why do we use option z?

vishalable
Автор

hey Madhur, thanks for a great tutorial
can you tell me how to get all these necessary option I can use on file check

prateeksarda
Автор

Hi Madhur! \n, \t, \c these are not working in my terminal. I'm using powershell. These are working in printf statement but not on echo statement. could you please help

Yuvaraj-rsfm
Автор

What would be nice would be if the text was down here in the comments--I'd like to play with it but why retype? Why not just allow a cut and paste? Otherwise though, nicely done!

cindybclark
Автор

The escape character don't work for me. I'm using ubuntu 14.04 any advice?

Slter
Автор

I'm stuck on this one. Am using a mac and created the shell file using Xcode but my terminal isn't able to differentiate between files and directories.
This is the code I used

echo "Enter a name:\c"
read $fname
if [ -f $fname ]
then
echo "well done boy"
else
echo "Damn you man..Dont you know the difference"
fi

What am I doing wrong ??

AbhishumatThakur
Автор

how can we give all the permission at a time

pallaanji
Автор

how can we check a file inside a directory 

pallaanji
Автор

none works except file and directory option

kannu