[wellylug] cgi script question

Mark Signal mark at databackup.co.nz
Sat Sep 11 12:55:03 NZST 2004


Sorry to take so long in coming back to you .. the joys of work and family
etc

To test I replaced the encryption bits with the "ls" command as follows:

find `echo $DATADIR$HTTP_REFERER | cut -c 1-24,46-` -type f -exec ls {} ';'

and it proved the basic syntax seemed ok - writing directory lists in the
browser window. Where the problem seems to occur is when the command is run
from a directory that somewhere in its path there is a space as in "path/My
Documents/rest of path" in which case it does squat. Interestingly if run
from somewhere higher up the directory tree it correctly outputs all
directories including those with spaces in their names.

I don't know how to pipe a "find -exec" command through sed so I tried:

for FILE in 'find `echo $DATADIR$HTTP_REFERER | cut -c 1-24,46-` -type f |
sed 's/ /\\ /g'`';
	do
	ls $FIND  | awk 'sub("$", "<br>")'
done

and this displayed the same problem so I added IFS=$'\n' to the script to no
avail.

at which point I swore a lot and gave up.

cheers



Mark


-----Original Message-----
From: wellylug-admin at lists.wellylug.org.nz
[mailto:wellylug-admin at lists.wellylug.org.nz]On Behalf Of jumbophut
Sent: Thursday, 9 September 2004 9:07 p.m.
To: wellylug at lists.wellylug.org.nz
Subject: Re: [wellylug] cgi script question


On Thu, 09 Sep 2004 14:48:26 +1200, Mark Signal wrote:
> here is my attempt:
>
> find `echo $DATADIR$HTTP_REFERER | cut -c 1-24,46-` -type f -iname
> *.extension -exec decryption bits {} ';'
>

What does this, on its own, return?
echo $DATADIR, $HTTP_REFERER

--
Tony (echo 'spend!,pocket awide' | sed 'y/acdeikospntw!, /l at omcgtjuba.phi/')


--
Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
To Leave:  http://lists.wellylug.org.nz/mailman/listinfo/wellylug

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.752 / Virus Database: 503 - Release Date: 3/09/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004




More information about the wellylug mailing list