10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm working on a shell script that reports service status on a database server.
There are some services that are in disabled status that the script should ignore and only check the services that are in Enabled status.
I output the service configuration to a file and use that information to... (5 Replies)
Discussion started by: senthil3d
5 Replies
2. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
3. Shell Programming and Scripting
Hi,
I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash:
testfile:
#2013-12-31
2013-12-31code:
grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies
4. Shell Programming and Scripting
Hi,
Below is the command to grep for a string under
grep -r "redeem" /home/tom
Need to make it case insensitive and exclude logs & tmp folders under /home/tom directory in my Search.
Need this in Linux. (1 Reply)
Discussion started by: mohtashims
1 Replies
5. UNIX for Dummies Questions & Answers
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Discussion started by: jcdole
1 Replies
6. Shell Programming and Scripting
I wrote this korn script and ran into a hole. I can use find to exclude all the hidden directories and to use my include file/exclude files for running a full backup
find / -depth -ipath '/home/testuser/.*' -prune -o -print| grep -f include.mydirs | grep -v -f exclude.mydirs
but when I... (8 Replies)
Discussion started by: metallica1973
8 Replies
7. UNIX for Advanced & Expert Users
I often find myself grepping source code for a variable name and many times the name would be present in comment lines that I 'd prefer not to see. Do you guys know any tricks to filter out comments?
Example:
snippet of the source code
/***
* type comment 1
***/
void ... (7 Replies)
Discussion started by: migurus
7 Replies
8. Shell Programming and Scripting
Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Discussion started by: hariza
4 Replies
9. UNIX for Dummies Questions & Answers
Hello, I'm trying to use grep or egrep to exclude a whole range of characters but how do I exclude both a single and a double quote.
It might be easier to say how do I use grep to find both single and double quotes.
grep ' ' " ' file
grep detects the first single quote within my... (4 Replies)
Discussion started by: Lindy_so
4 Replies
10. Shell Programming and Scripting
11132
13069
11137
11142
13070
Can I use grep command to exclude all lines beginning with 13?
I dont want to use grep -v 13 as potentially there will be a number with something like 11013 that I would exclude in error.. (2 Replies)
Discussion started by: frustrated1
2 Replies