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. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
3. Shell Programming and Scripting
Hi All,
I'm using aix flavour unix where im trying for the below kind of pattern to search in all the files in a directory.
I tried with different possible combinations like
grep -ir "out.*\transaction_ctry_code" * etc....
Pattern I'm trying for :
out<any thing>country_cd
Here i... (0 Replies)
Discussion started by: rmkganesh
0 Replies
4. Shell Programming and Scripting
hi,
i got files delimited by |^ character. eg.
apple|^ball|^cat|^dog|^egg
i need to find if the above file contains | (pipe ) character inside the data.eg.
apple|^ball|^cat|^d|og|^egg.
above file contains | character in the dog data. how can i search that. (4 Replies)
Discussion started by: krk
4 Replies
5. Shell Programming and Scripting
Hi,
I'm testing nginx-cache-purge and notice that grep searches all file content, and since the cache key is in the second line I would like to limit grep searching.
This is the script I'm using:
github.com/perusio/nginx-cache-purge
The line I would like to change and limit grep search... (5 Replies)
Discussion started by: nfn
5 Replies
6. Solaris
Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine?
Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies
7. Shell Programming and Scripting
I need to reduce a file's size below 50MB by deleting chucks of text. The following sed does this.
sed '/^begpattern/,/endpattern/d' myfile
However, it's possible that the file size can get below 50MB by just deleting the first instance of the pattern. How do I code that into sed?
Or can awk... (8 Replies)
Discussion started by: mariod1049
8 Replies
8. Shell Programming and Scripting
Hi all,
I have a folder with many files. I need to get all the filenames with the value "<f id=audio-time>*:*:*</f>" word.
* may be any integer.
I used find . -type f -exec grep -H '<f id=audio-time>.:.</f>' {} \;
command to get.
but i am not able to find the correct values.
Any... (2 Replies)
Discussion started by: ananthi_ku
2 Replies
9. UNIX for Advanced & Expert Users
Hello All,
I am trying to search one pattern across a file and then print it. But i need to delimit the search per line to 2 occurrences. How do i do that?
Regards. (9 Replies)
Discussion started by: Linuxee
9 Replies
10. Shell Programming and Scripting
Hi Friends,
I am having a funny problem with grep. When I run
grep 'expr' file.txt
things work fine. But when try to get the line number using the -n option, i.e,
grep -n 'expr' file.txt
I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded."
If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies