I have a file that I want to monitor.
Whenever a certain word is added to the end I want to be notified.
I have figured out how to do it manually... ie:
When I type this in - I get no output if the word 'Total' is not yet there - and I see the line printed out when it is found.
So far so good.
What I'd like to do is set this 'watching' in motion - have it check every 5 minutes or so until the word 'Total' shows up - then, stop checking and shoot me an email - or other desktop notification (that part I have figured out) - it's the starting and repeating the check that I am unsure how to do.
I am running this on /bin/bash
Thanks for any advice (or keywords to search)
I'm trying now to trigger an event when grep finds this line...
However - it gives me an error saying that :
Am I allowed to use -f in this way? Or is there something else that I can do to trigger something when it sees the 'Total' in the file?
Hi all,
Been reading a lot of the cpu load and its "analogy of it to car traffic path of expressway"
From wiki
Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states... (13 Replies)
Hi,
I found this in a script and I would like to know how this works
Code is here:
# var1=PART1_PART2
# var2=${var1##*_}
# echo $var2
PART2
I'm wondering how ##* makes the Shell to understand to pick up the last value from the given. (2 Replies)
Hi.
I have a text file with lines like this:
( chp_testfile_0065 "Blablabla." )
( chp_testfile_0003 "Blablabla" )
( chp_testfile_0123 "Blablabla" )
I need one more 0 in each line, so that I have 5 digits in a sequence. I also need an ongoing numeration from 1 to n, so that
(... (12 Replies)
Hi,
Good day to everyone.
This is my first time joining the community and wanted to say thanks in advance for all your help and assistance. First, I am not expert in AIX and UNIX but I do know a thing or two and I have a simple question regarding ISMP.
We are using AIX 5.3 and a couple... (0 Replies)
Hi
cat /etc/group :
....
oinstall:x:401:
dba:x:400:oracle
...
cat /etc/passwd|grep oracle
oracle:x:130:401::/home/oracle:/bin/ksh
1. Is that mean that :
ORACLE user has OINSTALL as it Primary group and DBA as secondary group ?
2. What is the linux comman to set ORACLE user with... (2 Replies)
Hi Gurus:
I am trying to understand the following line of code.I did enough of googling to understand but no luck.Please help me understand the follow chunk of code:
X=$0
MOD=${X%/*}/env.ksh
X is the current script from which I am trying to execute.
Say if X=test.ksh
$MOD is echoing :... (3 Replies)
Hi ,
Please help me in understanding the below commands
temp="$dirname.temp.cc.$$"
This will eliminate any trailing white spaces???
k=$(grep -cvE " |\+|-|0|1|\f" $temp
if (substr(file,2,24) ~ /{13,}/) {print "N" file} -- this is inside an awk script (4 Replies)
I just started shell coding and I'm a bit confused on how 'mv' works can someone explain to me how it works and if i did this correctly. Thanks.
echo "Enter Name of the first file:"
read file1
#echo $file1
if ; then
echo "Sorry, file does not exist."
exit 1
... (16 Replies)