10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
2. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
3. Shell Programming and Scripting
hi ,
i am having a file where i need to take ignore the data from file1.txt and redirect to another file
for eg:
file1.txt
AUS
USA
file2.txt
AUS,123
NZ,11
USA,12
i am using the below code (4 Replies)
Discussion started by: rohit_shinez
4 Replies
4. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
5. UNIX for Advanced & Expert Users
need a Command in UNIX which can find out a word from files in multiple directories
e.g.
/home contains multiple directories
/home/d1
/home/d2
.
.
.
.
/home/dn
under d1,d2...dn contains multiple files. I need to search a specific word in a files under these multiple... (1 Reply)
Discussion started by: jagkoth
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am facing the below problem
I have a list of number to be searched(around 1000) files resideing in multiple directories as i dont know where it resides in. for example
search string is like (abc)123456
please help. very urgent
Thanks a lot
Uma (3 Replies)
Discussion started by: umapearl
3 Replies
7. Shell Programming and Scripting
I tried awk for this, but failed <or my code is not correct? I dont know>. Can anyone help me on this?
---------- Post updated at 08:34 PM ---------- Previous update was at 08:29 PM ----------
my working file looks like this:
<empty>
<empty>
<empty>
NAME :ABC AGE :15
GENDER... (6 Replies)
Discussion started by: kingpeejay
6 Replies
8. UNIX for Dummies Questions & Answers
I have a couple of things I got stuck on
1)
I have a text file containing 25k search string that I need to search against compressed file. I have used this command but somehow it doesn't seems to use all the search terms.
I have put one search string per line in the txt file (I clean up... (2 Replies)
Discussion started by: m00
2 Replies
9. UNIX for Dummies Questions & Answers
I want to search for a file pattern in more than one directory. How I need to do that?
Here is the scenario:
I am having a directory structure like the following:
/log
...../20051001
..........ftp_server_20051001.log
..........ftp_down_server.log
..........ftp_up_server.log... (7 Replies)
Discussion started by: ravikirankethe
7 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am newbie in UNIX so please excuse for my questions.
Is there a a way to search for string in files within folder and sub folder in particluar file extensions.
Ex. search for ABC in folder 'A'(including it's sub folders) in html, xml files.
Thanks,
Ani (2 Replies)
Discussion started by: anikanch
2 Replies