very urgent..need of a script which finds a file without the use of find command..hlp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers very urgent..need of a script which finds a file without the use of find command..hlp
# 1  
Old 05-31-2009
very urgent..need of a script which finds a file without the use of find command..hlp

im a beginner in shell scripting and i need a script which will find a file in a given path without the use of find or grep command.......i need some kind of code.....plzzz plzzzz help me......ive tried n searched every where but i couldn't find the solution for my particular problem.....
# 2  
Old 05-31-2009
Why can't you use find or grep?
# 3  
Old 05-31-2009
Quote:
Originally Posted by mishi
im a beginner in shell scripting and i need a script which will find a file in a given path without the use of find or grep command.......i need some kind of code.....plzzz plzzzz help me......ive tried n searched every where but i couldn't find the solution for my particular problem.....
This sounds like a homework question.
Why can't you use find and grep? What is the real world problem?
# 4  
Old 05-31-2009
maybe try "locate" command?
# 5  
Old 06-01-2009
yeah it waz my homework but i tried a lot to do it myself but i couldn't thts why i posted it here....now my mam has allowed to use find command.....any way thnks for ur help!!!!!!!!!!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Command finds some, misses some

The contents of my home directory: bin Desktop Documents Downloads folders Music Pictures Public Templates Videos When I run the command for file in /home/myself/*d*; do if ; then echo $file; fi; doneit finds /home/myself/Downloads /home/myself/Videos but not "folders". ... (5 Replies)
Discussion started by: Xubuntu56
5 Replies

2. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

3. Shell Programming and Scripting

Read xml file till script finds separation and run again for next input and so on

Hi All, I have one query, I managed to run script with user inputs through command line or with 1 file. But I need to read a txt file/xml file in which user can mention multiple sets of answers and script should run for each set till it reach the EOF. Thanks in advance for example, the file... (3 Replies)
Discussion started by: rv_champ
3 Replies

4. Shell Programming and Scripting

I want my script to NOT to send an e-mail if it finds the same keyword more than twice.

My script triggers and e-mail if keywords supplied to it were found. Problem is if it find the same keyword continously (due to continous server errors), it triggers mails and fillup my mail box with same message (which is not required) I want my script to NOT to send an e-mail if it finds the... (13 Replies)
Discussion started by: Rajeshneemkar
13 Replies

5. Shell Programming and Scripting

sed finds nothing but it changes file's timestamp

I must go through some files to change a certain string within text files to another string. I use openSUSE and folders are mounted by cifs. Text to be replaced (only in .m extension) is U:\FOLDER and new string is N: That works fine with spaces in directory names etc., but this process ... (5 Replies)
Discussion started by: Pappa41
5 Replies

6. Shell Programming and Scripting

Problem with Find command urgent help!!

hi I used find command to find some file names as per input from user. I used it for current directory. It was working fine. Now I tried with giving some other directory path. Its giving issues. Here what I tried. Script will take input from user say 1_abc.txt, find the file and print list. if... (1 Reply)
Discussion started by: sukhdip
1 Replies

7. UNIX for Dummies Questions & Answers

find -size -7M finds files, but won't cp them all

If I run: find /somefolder -type f -size -7M | wc -l I get 73594 files But when I run find /somefolder -type f -size -7M -exec /bin/cp -v {} /someotherfolder/ \; it only copies 38891 of the files to the folder, why? There's a mix of all types of files in /somefolder. Is there some other... (12 Replies)
Discussion started by: unclecameron
12 Replies

8. Shell Programming and Scripting

Looking for command(s)/ script to find a text string within a file

I need to search through all files with different file suffixes in a directory structure to locate any files containing a specific string (5 Replies)
Discussion started by: wrwelden
5 Replies

9. UNIX for Advanced & Expert Users

urgent: problem with find command

find / * -print > /var/tmp/updatedfilelist.txt 2>&1 i need to run the above file in cron. problem is, this process takes a long long long time to finish up. and even worse, it fills up the directory the output file is located in. i dont want the /var directory to ge filled up because of... (10 Replies)
Discussion started by: Terrible
10 Replies

10. UNIX for Dummies Questions & Answers

find command - Urgent Plz.

Hi, In my current directory, i have the following files: x1.dat x2.dat.gz x3.dat I want to use the find command and display only files which has *.dat and NOT *.gz extension files. Please help me out. Thanks, Kris Kart. (2 Replies)
Discussion started by: Kris_Kart_101
2 Replies
Login or Register to Ask a Question