Programming :: Tail The Message Log| Grep - Several Words - Play A Sound When It's Found

Jul 4, 2011

I'm trying to write a script that will either tail or watch /var/log/messages for the words

PHP Code:

signal Gone into alarm state

From this line below.

I would then like the script execute:

And have run at start up.

I'm stuck with grep-ping only one word

PHP Code:

View 14 Replies


ADVERTISEMENT

General :: GREP On Words With 2 Or More Z's?

Dec 21, 2010

I need to grep a dictionary file.Only the words that contain 2 or more z's and only 1 b needs to be listed.

View 1 Replies View Related

General :: Grep 2 Words At The Same Time?

Sep 9, 2010

I want to grep any line with "john" or "jack". How to do that? I tried

grep john | grep jack
but it didn't work

View 2 Replies View Related

General :: Use Grep To Find The Words In The Dictionary?

Dec 1, 2010

I'm trying to use grep to find the words in the dictionary that contain the letters "th" and the letter m.

I tried grep 'th m*.' Desktop/Dictionary/words(Thats where the destined dictionary word document is located)

grep 'th' Desktop/Dictionary/words works but only for the words with th. I have no idea of what expression to use to make it a unionized expression with m

View 3 Replies View Related

Ubuntu :: Output Of Command In Less And The Words Highlighted By Grep?

Sep 1, 2010

So theres this command

Code:
man -k mail
Which lists commands that contain the keyword "mail" in their description.I want the output of this command in less and the words highlighted by grep. Something like

Code:
man -k mail | grep mail | less
The command doesn't work, how do I fix it?

View 2 Replies View Related

Ubuntu :: Getting Grep To Pull Info From A Specific File Which Match All The Words?

Jun 2, 2011

I am trying to use grep to only tell me files that include both words matching in a pattern file. However when i specify:

grep -f <pattern file> <file>

It pulls out anything that matches one or the other.

Not both.

how to get it to match AND not OR.

View 9 Replies View Related

Debian Hardware :: Get A Message That Sound Card Wasn't Found

Jun 10, 2011

I am using debian on kernel 2.6.38-2-amd64 with Kde 4 and I have one sound card integrated on my mother board (Asus A8N32-Sli Deluxe) with Nvidia CK804.

Often when I start debian I get a message that sound card wasn't found, therefore from the Konsole I have to reload the as:

xxxx@debian:~$ sudo alsa reload
Unloading ALSA sound driver modules: snd-intel8x0 snd-ac97-codec snd-mpu401 snd-gina20 snd-pcm-oss snd-mixer-oss snd-mpu401-uart snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-timer snd-seq-device snd-page-alloc.

[Code].....

View 2 Replies View Related

General :: How To Use Tail -f With Sound

May 8, 2011

I am trying to use tail -f and play a sound everytime a new line appears. I tried this: for i in tail -f myFile; do aplay alert.wav; done; Which kinda worked, the output is:

Playing WAVE 'alert.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
Playing WAVE 'alert.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
Playing WAVE 'alert.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono

But after 3 times it stops, and I would like to print the tail -f result and not the aplay result. How could I achieve that?

View 1 Replies View Related

Programming :: Input File - Grep Within Grep

Nov 22, 2010

I need to kind of grep within grep. My input file would be something like:

[Code]....

and I need to find the first occurrence of hello before MY PATTERN (hello 9008 in this case), so the output should be:

[Code]....

View 4 Replies View Related

OpenSUSE Multimedia :: Play A Song With Amarok Or Banshee Not Heard All The Words?

Apr 24, 2010

to play a song with amarok or banshee not heard all the words, hear the music but the lyrics only in parts.

View 7 Replies View Related

Software :: Play Videos In Redhat 5.0 - Unable To Play Video And Still Giving Error Message

Feb 2, 2010

when i try to play a video, from internet it is showing the message 'Either javascript turned off or download and install latest adobe flash player'. But eventhough I downloaded and installed adobe flash player I am unable to play any video and still it is giving the above message. what is the reason?

View 2 Replies View Related

Debian Programming :: Play Beep / Alert Sound When Somebody Joins LAN

Aug 23, 2013

Code handy which could play a beep/alert sound when somebody (any user) joins your LAN. Or as second-hand choice, if this is too hard, to play a beep when X terminal windows writes some output lines.

View 2 Replies View Related

Programming :: Play Multiple Sound Streams On ALSA Dmix?

Jul 31, 2010

I'm having trouble getting ALSA to play multiple sound streams (multiple sounds at once). My code is running on an embedded ARM board using a AC97 sound. It will only play one without any mixing, I have to use pure ALSA as higher sound mixers are a nightmare to cross compile for ARM. I've tested my system with aplay for example

aplay -D plughw:0,1 bang.wav

works fine. So I tried dmix with

aplay -D plug:dmix Win.wav

That gave the following error

ALSA lib pcm_direct.c:1587snd_pcm_direct_parse_open_conf) The field ipc_gid must be a valid group (create group audio)
aplay: main:550: audio open error: Invalid argument

I checked asound with

/etc # cat asound.conf
pcm.EP93XX {
type hw

[code]....

Does this mean dmix will not work? Is there someway with the above setup I can play multiple sounds? I have to use the vendor ALSA build (so can't update ALSA), I can change the .confs however. Also because I'm cross compiling things like pulseaudio SDL are very difficult to get working, so I basically need to use the above ALSA. Is there anyway I can find if dmix exists on the system?

Should add aplay -L does show dmix ?
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'

[code]....

View 3 Replies View Related

OpenSUSE Hardware :: Unable To Get Sound-test To Play Sounds As Well As Connect To The Sound Device In Vmware And Play Sounds?

Nov 5, 2009

I'm trying to figure out what in the world is going on with my sound in OpenSuSE. I put in a brand new Audigy chipset soundcard and finally got some sound to come out of the speakers. I used the guide here: SDB:AudioTroubleshooting - openSUSE. to fix the permissions on my sound and am able to get sound-test to play sounds as well as connect to the sound device in my vmware and play sounds. That being said, I have terrible sound quality coming out. There is a lot of static sound like white noise and the volume of the actual sound played is very low compared to the noise. The sounds also distort somewhat.

I have tried the pulse audio change in the tutorial above also and have been searching around google. The only problem that I saw similar was a person who fixed the problem by updating KDE. I don't have KDE, I'm using Afterstep.

View 9 Replies View Related

Programming :: C++ Programming With Simple RTAI Functions Outputing Words?

Apr 11, 2011

I need help as I am not proficient with Linux C++ Programming. There are two parts which I need to do in the coding provided below.

1. Produce the program so it can output the word "Hey there!" and wait two minute and print the word "See you later!".

2. Produce the program that will output the text "Cool" every 20 seconds by setting a periodic task.

Quote:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk("Hey there!

[Code]...

View 3 Replies View Related

General :: Grep: Return An User Message When No Hits?

Jun 13, 2011

I have ASCII files to parse that 48 hours old or more ; I can identify them like so

Code:
find . -name "FILE*TXT" -mtime +1 -exec ls -ltas '{}' ';'

Some files have a list of hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like so

Code:
grep ^err R*VER && echo "No error"
FILEA.TXT:err->USB3910err
FILED.TXT:err No Error

This grep statement works but it seemingly overrides the find() statement above if I run both at the same time... How can I combine the two statements to create a report that lists the filename and error(s) like so

Code:
FILEA.TXT Button3320err
FILEB.TXT USB3235err
FILEC.TXT IR Remote2436err
FILED.TXT No error

Is it possible to return "No error" with the file name without error?

View 11 Replies View Related

OpenSUSE Hardware :: Sound With New Sound Card - Web Browser Is Unable To Play Any Sound

Mar 24, 2010

After installing an external sound card, Im having some weird issues. The cards chipset is fully supported by suse, (CM8738) so I dont think thats the problem. Besides, I'm getting sound, but not in some applications. The system's sounds work just fine (login, logout themes) amarok plays without any problems, kaffeine, mplayer they all work flawlessly, in fact I can see the difference in quality between the onboard sound and my new card. However, no web browser is able to play any sound at all, firefox, opera or chrome, nothing,zip. Plus, vlc cant reproduce sound either, nor can smplayer.

I've tried switching channels on and off(muting)in kmixer and in alsamixer, on the console, with no results. I disabled the onboard audio on the bios before installing the new card, however my ati video card has integrated sound, which I cant disable.... I used to get this exact same problem randomly with the onboard sound, but I just had to go to kmixer and turn up the "pcm" channel volume, which was set to 0, and I had sound again on my browser. However this card's pcm channel is at max and turning it up or down affects the whole systems volume, not just the browser's. Is it better to just reinstall the sound system, if so how could I do that.

View 7 Replies View Related

Programming :: Add Text Between Two Words?

Mar 3, 2011

For example if i have the following "OneThree" and i want to add the word "Two" between "one" and "three". To have "OneTwoThree" How can i do this?

View 2 Replies View Related

Programming :: Array Containing Words In C?

Sep 24, 2010

This array is supposed to contain 12 elements (names of the month) What I want to achieve is that depending on some user input (a number 1-12) a full name of one of the months will be displayed, eg.

Code:
scanf("%d", &month);
printf("The month is %c", months_names[month]);

View 6 Replies View Related

Debian Multimedia :: Online Radios - Words Are Continuously Broken By A Metallic Sound

Jun 5, 2011

I am running debian testing, amd64 on my box. In general, I do not experience particular multimedia problems; I can watch & listen to ..... videos without a glitch and even webcasts like [URL] do not pose any problem. However, I experience problems with some (reputable) online radios, for instance when I visit the link [URL] then words are continuously broken by a metallic sound. However, if I open e.g. with totem a simple file such as france_culture_mp3-128k.m3u whose content is given by

[Code]...

then the sound is OK. This is puzzling as this text file once again points to the same radio franceculture! Does anyone have an idea of what is going on? It seems to me that whenever I try to listen to an online radio from within iceweasel, then I have sound problems, but I have installed many plugins and I do not have problems with video webcasts that of course also include sound.

View 12 Replies View Related

Programming :: Php Can Recognize The Number Of Words?

Jun 16, 2010

User submits a ms word file, and the php can recognize the number of words? Is it only possible for ms win server?

View 1 Replies View Related

General :: Grep Fails In Shell Script When String Not Found / Why Is So?

May 3, 2011

I am having trouble using grep command. I want to search for each line in first file in second file and if they are present, write to file called successfile else to failfile. Below is the code

what is happening is, when the first failure occurs (when a line in first file is not present in second file), the script is killed.

Can anyone please tell me what I am doing wrong? code...

View 4 Replies View Related

Programming :: Awk To Extract Phrase Between Two Words On A Line?

May 25, 2010

im trying to find a way to extract the phrase between the words Connection and is (ie the underlined words below). Can we use awk to do this? How? Is it the best command to use?

Code:

[06:25:00][i] Connection at Plant A is live
[06:25:00][i] Connection at Building_C is not live
[07:25:00][i] Connection at Terminal D is down

View 12 Replies View Related

Programming :: Display Every Line That Does Not Contain One Of Listed Words / Fix It?

Feb 17, 2010

I am trying to eliminate false lsof file records but it does not work code...

View 4 Replies View Related

Programming :: Script To Exclude Words From A Lists?

Jun 16, 2010

how to delete string inside the file addresses.txt. The string I want to delete on addresses.txt was on removed.txt. I have a file addresses.txt and it includes the ff format:

test@foo.com
true@fee.com
fee@tik.com
ew@kit.com
test@foo.com

[Code].....

View 5 Replies View Related

Programming :: Awk - Calculate The Number Of Words Containing Letter E In A Textfile?

Oct 12, 2010

i need to calculate the number of words containing letter e in a textfile.

View 9 Replies View Related

Programming :: Script To Search Users Home Directories For Certain Words?

Feb 20, 2011

I am trying to create a bash script that will search all users home directories on a system for words like quit, steal, kill etc. Pretty sure I'm going to be using grep /home. The only thing is that obviously a word like 'kill' could have normal uses too like "I need to kill the process." How would I go about flagging a user with the word/phrase found, and the path while also omitting legitimate uses?

View 1 Replies View Related

Programming :: Gedit - Plugin To Make HTML Tags From Words?

May 15, 2011

I need some plugin for Gedit (or maybe other HTML-editor) which will make tags of words, like: I type "div", hit some hotkeys or anything else with keyboard and get "<div></div>". The same with all the words I type in. Do you guys know which piece of software can do such things?

View 2 Replies View Related

Programming :: Highlight Some Key Words As Tailing A Log File Using A Perl Script

Oct 21, 2010

I'm trying to highlight some key words as tailing a log file using a perl script; about my case: I want to search for a keyworrs just once and highligt all occurrence of them. I want just highlit the keywords but not the whole line but the problems are that perl just catches the first keyword in a line and skip checking for other occurrence. for example if a line like "Error: some exception happen, Unable to process" it just highlight the error and do not process the remain part of the line where it should hilight the word "exception" and "Unable"

2-How can I do some action if for exapmle at least 4 time "unable" message appear ( not just in one line but diffrent line)in below is how I use perl search and replace : Code: s/(?:(unable|exception|warning))/e[1;31$&.......

View 2 Replies View Related

Programming :: Substitute Few Words + Change All The Lines Starting With A Specific Word + Put Blank?

Jan 17, 2009

I have an old-address-list file which is having around 1500 entries. I need to convert this addresses in to a specific format.

The old-address-list file>
# cat old-address-list-file
dn: CN=Muhammad Hadhi K.M,OU=IT Dept,OU=Example Company H.O,DC=example,DC=com
cn: Muhammad Hadhi K.M

[code]....

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved