Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.

Perl script to find process and exclude strings from the output

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Perl script to find process and exclude strings from the output

Hi team,

I'm a newbie of Perl Script and looking to create a simple perl script that will run in the Linux system:

1) to find process, such as ps -ef | grep process name
2) to exclude strings from the output if it found, for instance if i see abc from usr process, then will exclude it from the output so then the monitoring will only monitor the process I need.

Can someone please advise on how to create a script like this?

# 2  
Sounds like homework which - if true - would collide with forum rule #6).

If this is NOT homework, please give some evidence/background/motivation.

In either case, post your attempts/ideas/thoughts.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Using find to output list of files with specific strings
This is my problem, I am using the following code to extract the file names with specific strings 0.01: find ./ -name "*.txt" -exec grep -H '0.01' {} + It works wonders with a small sample. However, when I use it in a real scenario it produces an empty file -even though I am sure there are...... UNIX for Beginners Questions & Answers
UNIX for Beginners Questions & Answers
Exclude particular files from strings output
Hi everyone, Is it possible to have the command strings exclude particular files? Here is what I am currently writing: strings *20161212* It prints all files in the directory, which is good, but some file types do not need to be printed because they contain gibberish. I am trying the...... Shell Programming and Scripting
Shell Programming and Scripting
[Solved] Using Find with an exclude/exclude file
I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is...... Ubuntu
Find command to exclude directories and setup alias or script?
Hi, Firstly - sorry for the duplicate my other post looked like i was posting a how to for people. But i am wanting some help :P I want to search from / to find files and exclude my mounted ntfs drives. I have found this thread (Which I can't post the URL to until i have 5 posts) it's...... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
Perl:how to find multiple strings
Hi , i'm trying to find lines in a file that have 2 matches,but i have trouble with regex -it doesn't search for a second string-please help #!/usr/bin/perl -w use strict; use warnings; my $log = "log"; my $log_string = "grep '^8=' $log |"; usage (); chomp (my $TAB_1 = $ARGV); chomp (my...... Programming

Featured Tech Videos