REGEX PROBLEM

2003-07-25 Thread magelord
hi, i have the follwing strings: /tmp/test/.test.txt /tmp/test/hallo.txt /tmp/test/xyz/abc.txt /var/log/ksy/123.log now i need a regex that matches all lines but the one that contains a filename starting with a point. like .test.txt. how can i do that? this is what i have: '\.(?!tgz)[^.]*$'

RE: REGEX PROBLEM (fwd)

2003-07-25 Thread magelord
---BeginMessage--- Hi A way to solve your problem is to use the FILE module and take the filename out using basename. I think BaseName.pm can be downloaded form CPAN. Please try the following: use File::Basename; @filenames = qw (/tmp/test/.test.txt /tmp/test/hallo.txt /tmp/test/xyz/abc.txt

NEED HELP WITH REGEX....

2003-07-14 Thread magelord
hi, i have this regex: \.(?!.png|.log)[^.]*$ how can i replace the .before png and log with nothing? the problem is, the alternation can be longer, like that: \.(?!.png|.log|.txt|.c|.cpp and so on )[^.]*$ how could i do that? THANKS:-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

-M filetest operator

2003-07-11 Thread magelord
hi, why cant i check the age of a file when the path contains a point? --- use File::Basename; #$path=/home/raid/golchert/.cxoffice/dotwine/filelist.dat; $path=/tmp/someFile; print \n alter von $path = .(-M $path). \n if (-M $path =4 !(dirname($path)=~/\./) !(-d $path)); --- maybe you have to

Getting the size of special files in a directory?

2003-07-03 Thread magelord
hi, is it possible to get the size of special files in a directory? i need the size of all gz or html files. this works, i did it with glob. but how can i get the size of files that match a pattern? for example all filesnames that contain the string setup. or all files that are younger than 7 days

Regex question

2003-07-01 Thread magelord
hi, i have this regex: \.[^(gz|html)]$ this regex should match all files (lines) NOT ending with gz or html. but this is not working. the lines ending with .gz are still found. whats wrong with that? THANKS A LOT :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

How can i make this faster?

2003-06-27 Thread magelord
hi, i wrote this little program. it reads a file and puts the output into a treelike structure. the content of the file is the output of the du command. something like that: 124k /var/backups/dpkg.status.3.gz 12k /var/log/auth.log.1.gz 12k /var/log/daemon.log.1.gz 12k /var/log/debug.1.gz 12k

put path together?

2003-06-26 Thread magelord
hello to everyone. when i have a path like that: /usr/X11R6/lib/X11/locale how can i cut this path into strings like that: / /usr /usr/X11R6 /usr/X11R6/lib /usr/X11R6/lib/X11 /usr/X11R6/lib/X11/locale and write this at the beginning of a file? i tried many things, but all things i tried

(kein Betreff)

2003-06-25 Thread magelord
hi, i wrote this little program. it shows a directory structure using tree and hlist. it reads the directoycontent from a file. when i display small directories, the program starts fast, but as soon as the directory is big, it takes a long time to start. for example when i use the /var directory.

using FIle::Find::name if regex to filter

2003-06-23 Thread magelord
hi, how can i use a real regex with this: File::Find::name if -x? the filetestops are working fine, but how can i filter things like .gz$? i tried many ways, but all failed. any idea? thanks!! bye andreas -- .::Please visit my homepage::. http://www.math55.de.vu .::A very good JAVA site