LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I don't understand (http://www.linuxquestions.org/questions/linux-newbie-8/i-dont-understand-555762/)

Coimbra 05-22-2007 05:18 AM

I don't understand
 
#!/bin/bash
# Listador de archivos y directorios ocultos

DIR=$1
if [ -z $DIR ]; then

echo "El primer argumento debe ser un directorio"
exit 1
fi
if [ ! -d $DIR ]; then
echo "El directorio debe existir"
exit 1
fi

for i in $DIR/.*; do
echo "Encontré el elemento oculto $i"
done
echo "Saliendo..."

--------------------------------------------------------

Hi, I'm sorry but I don't understand the significate to (!) and (-d) in the line 10. Could you explain me it? please.

Thanks to all.

acid_kewpie 05-22-2007 05:26 AM

! = not
-d = is a directory

check the "test" manpage for full details

also, please use better thread titles in future.

Coimbra 05-22-2007 05:38 AM

Quote:

Originally Posted by acid_kewpie
! = not
-d = is a directory

check the "test" manpage for full details

also, please use better thread titles in future.

ok, I understand,


All times are GMT -5. The time now is 08:50 AM.