[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script bash



On Sun, 26 Jun 2005 (17:48), Sandro Tosi wrote:
> #!/bin/bash
> TMP=$1
> RES=`file $TMP | grep directory`
> if [ -z "$RES" ]
> then
>   echo "not a dir"
> else
>   echo "dir"
> fi
Non complicatevi la vita. Da "$ help test"
        -d FILE        True if file is a directory.

Ciao,
-- 
Daniele                 JID: dan@jabber.linux.it (http://www.jabber.org)
and remember: respect is everything . . . . . . . . . . . free your mind

Attachment: signature.asc
Description: Digital signature


Reply to: