Hello
I have to execute exactly this linux command using shell_exec .
find /test/ -type f -mtime +5 | awk '{print "rm \""$1" "$2" "$3"\" " }'
but I receive always a parsing error . Any help please ?
Thank you
| SitePoint Sponsor |


Hello
I have to execute exactly this linux command using shell_exec .
find /test/ -type f -mtime +5 | awk '{print "rm \""$1" "$2" "$3"\" " }'
but I receive always a parsing error . Any help please ?
Thank you


in other words using echo (which is the same to test)
echo" find /test/ -type f -mtime +5 | awk '{print \"rm \"\"$1\" \"$2\" \"$3\"\"\" }' ";
return this
find /test/ -type f -mtime +5 | awk '{print "rm ""$1" "$2" "$3""" }'
while I want return this
find /test/ -type f -mtime +5 | awk '{print "rm \""$1" "$2" "$3"\"" }'





May I suggest:
Code:find /test/ -type f -mtime +5 -exec rm -f '{}' ';'
try this
PHP Code:echo " find /test/ -type f -mtime +5 | awk '{print \"rm \\\"\"$1\" \"$2\" \"$3\"\\\"\" }' ";
Dwarth
Uniprix Inc.


thanks!
Bookmarks