Hi,
We used to use the below commands often.
Code:
ps -ef|grep [a]bc
ps -ef|grep abc|grep -v grep
Both fairly returns the same result.
For example, the process name is dynamic and we are having the process name in a variable, how we can apply the above trick.
For example "a" is the variable which contains the process name abc, then
Code:
ps -ef|grep $a|grep -v grep
This w
Hi
Here is the problem ( Exercise 3-3, Using The Shell of The Unix Programming Environment, Kerninghan, Pike, 3rd edition ):
Predict what each of the following grep commands will do, and then verify your understanding.
Code:
grep \$
grep \\$
grep \\\$
grep '\$'
grep '\'$'
grep \\
grep \\\\
grep "\$"
grep '"$'
grep "$"
A file containing these command
I receive a segmentation fault on some servers when grepping a string, but not when I use -i, and vice-versa.
I'm trying to use Here documents to pass several commands to a remote server over SSH. However I'm having problems.
Hi All
I'm having a problem grep'ing files for a certain string on my server. The command I'm using is:
find .
Here Is a problem I am facing with awk.
Query --> I want to search for a string in a file and print next 15 lines below the matched string.
1.We do not have GNU grep so cannot use grep -A or grep -B commands.
2. Instead of passing the search pattern as a string to awk.
Hi All,
I have a csv file like the following:
"ABCD2","EFGH2","XXXX","1"
"ABCD2","EFGH2","XXXX","2"
I want to grep out the row which contains the value of 2 within the 4th column, so then i can use the extracted record to cut up and store into numerous variables.
Obviously when trying `cat csvfile.csv | grep 2`
Hi,
We are getting a curios result in one of AIX script.
I know about standard "ps ..|grep ..