473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Find statment

123 100+
Hi All,
I am writing one find statement which gives me all the files related with the specific user name the user entered.
my code looks like
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $title = "Grading Form";
  3. if(isset($_POST['fname'])) { $f1 =  $_POST['fname']; }
  4. if(isset($_POST['lname'])) { $l1 =  $_POST['lname']; }
  5. if(isset($_POST['add'])) { $a1 =  $_POST['add']; }
  6. if(isset($_POST['date'])) { $d1 =  $_POST['date']; }
  7. $fullname = $l1.","." ".$f1;
  8.  
  9. $dirname = "/home/gr/ereports/O1"  ;
  10. $handle = opendir($dirname) or die('cant open');
  11. $ans = shell_exec("find /home/gr/ereports/O1/$d1*  -name \"*.ps\"  -exec grep -i -e $fullname  {} \\; -print0 ");
  12. echo $ans;
  13. ?>
  14.  
here I am getting all the files with the username as a string..If there are 4 files, I got all file's path as a single string.
I want to make them seperate..May be an array or newline or something..And not as a whole string..Is it possible with some options adding in the FIND statment ?
What can be done
Sep 18 '08 #1
0 1454

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: mr_burns | last post by:
hi, how do i do a SELECT statment that will just query a table to find the row with the maximum of a declared field. for example, if i have a table of customers and i would like to get the value...
3
by: Eshrath | last post by:
Hi, I have an xsl where a particular child node (<sub1> and <sub2> )can occur in two type of parent nodes (<A> and <B>). like <A> <sub1>11</sub1> <sub2>22</sub2>
1
by: Me, Myself, and I | last post by:
First off, i apologize if my terminology is off... I am currently in a project that is basically a front-end to a database. In coding this, I am taking into account that it has the *potential*...
2
by: Jim Heavey | last post by:
I am tyring to figure out why a class that I am trying to instatiate can not be found. I am NOT WORKING WITH PRE_COMPILED code. I am dragging the source code over and placing the code in a...
1
by: zeebiggie | last post by:
Good morning I have a form with the controls in the insert statment below. table1 has an Auto increment primary key hence is omitted in the insert statment and form. Am getting the error It didnt...
2
by: rg3480 | last post by:
I have 2 colums, one with the list of all students id number and if they are in a double major their id is listed 2 times in the colum. The next colum is the id of the specific business scholl they...
1
by: kraj123 | last post by:
Hi, How to Find ,if already a environment variable is set in hash table in perl. Actually i want to check if a environmental variable in perl script, which is present in oracle database has...
5
by: zensunni | last post by:
Say we have a couple of tables like so: Departments_to_Employees department_id employee_id Employee employee_id I want to find how many employees the department with the maximum amount of...
3
by: ajd335 | last post by:
Hi All, I have a page in which user can enter first name,last name , date and according to that My script should search for the records which matches the above last n first names and print it. I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.