LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2007, 05:18 AM   #1
Coimbra
LQ Newbie
 
Registered: May 2007
Posts: 20

Rep: Reputation: 0
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.
 
Old 05-22-2007, 05:26 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
! = not
-d = is a directory

check the "test" manpage for full details

also, please use better thread titles in future.
 
Old 05-22-2007, 05:38 AM   #3
Coimbra
LQ Newbie
 
Registered: May 2007
Posts: 20

Original Poster
Rep: Reputation: 0
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,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why, help me understand what is going on..... jymmi Ubuntu 9 05-22-2007 10:12 PM
can not understand ramanadyv Linux - General 1 06-06-2006 07:13 AM
i could not understand sunlinux Red Hat 5 02-03-2006 05:44 PM
Help me understand what this is saying. Distorted.Clarity Linux - Newbie 11 12-13-2005 07:31 PM
understand 1.4 mAineAc Linux - Software 6 01-06-2005 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration