0
votes
2answers
37 views

I want to find out word which ends with ()…Use grep

I want to find out word which ends with ()...Using the grep command in linux. grep file_name_where_i_want_to_search "*()" some thing like that....but its not working
-1
votes
2answers
65 views

how to find number of substrings between delimiter? [closed]

I have the string following something(1)^^^something(2)^^^something(3)^^^ ... ^^^something(n) how to find number of something(s) in the string.
0
votes
2answers
4k views

Get the process id from ps -ef grep (or Stop an application before removing it)

I have an rpm and I want on uninstall to check if my application is running and if it is stop it before running the uninstall. My service runs under a specific user. How can I do this using bash in ...
1
vote
1answer
846 views

shell scripting grepping for pattern and then echo message

I have a file which has the below pattern ================================================= 4601 -- it means completed 4602 -- it means failed 4603 -- it means timed out ...
0
votes
1answer
300 views

grep + match quantity and numbers

with the following command I can verify/match if param have numbers or "." param=2.3.1 echo $param | grep [0-9][.] but what I need to add in my syntax in order to verify also if I have at ...
1
vote
1answer
463 views

solaris + egrep command syntax not work

my target is to match snmpmanager string from /etc/hosts file in Solaris machine I don’t get any match output from the following command (but snmpmanager already defined in host file) why?? egrep ...
1
vote
1answer
263 views

What does this Linux shell script line do?

I'm trying to determine exactly what the following line of shell script is doing.: grep --files-with-matches '>' . | sort | uniq | xargs perl -pi~ -e 's/9Kp/9K /' /home/user/DATAFILE.DAT I'm ...
4
votes
4answers
5k views

grep changing the delimiter

any way we can change the delimiter that uses grep? I think, by default, grep uses \n as the delimiter.
0
votes
6answers
2k views

A better way to search for a string within a file?

I am trying to find a particular string of text in a file somewhere on my hard drive. The best I have come up with so far is: find -type f / | xargs cat | grep "string to find" But this just tells ...