[Qgis-user] help to list files by bourne-shell

pcreso at pcreso.com pcreso at pcreso.com
Wed Jun 20 12:51:47 PDT 2012


Hi Jan

for i in C:/Users/tappenbeck/Desktop/Project/*;

change to :

for l in `ls C:/Users/tappenbeck/Desktop/Project/` ;


enclosing a comand in back quotes will return the result of the command, & you want to return a list iof the contents of the folder, not the string which is the folder name.


--- On Thu, 6/21/12, Jan Tappenbeck <osm at tappenbeck.net> wrote:

From: Jan Tappenbeck <osm at tappenbeck.net>
Subject: [Qgis-user] help to list files by bourne-shell
To: "qgis-mailingliste" <qgis-user at lists.osgeo.org>
Date: Thursday, June 21, 2012, 2:36 AM

hi !

i want to create a script for use in msys - but i am not a linux-user. i try to create this by a template:

#!/bin/sh
# Einfaches Beispiel

for i in C:/Users/tappenbeck/Desktop/Project/*;
do
if [ -d "$i" ];
then
echo $i is directory;
fi;
done

but there will no files list - can anyone help me ?

reagards Jan :-)

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20120620/271d26ae/attachment.html>


More information about the Qgis-user mailing list