Sponsored Content
Top Forums Shell Programming and Scripting Notification of the modification of a specific entry in a file Post 302708625 by anil510 on Monday 1st of October 2012 11:11:46 PM
Old 10-02-2012
Notification of the modification of a specific entry in a file

I need to get notification via email when the line containing a pattern is changed in a file. Not during the time any changes to file occurs. Ie if we reset a user password say example, demouser the hash in the line containing the word demouser in the file /etc/group changes. So when this change occurs to the line containing demouser, a notification mail should be send, along with the details of the process that made this change. Is it possible?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

crontab entry modification using shell script

hi Friends, iam trying to write a script which will grep the particular entry in crontab of root and enable/disable it .iam a novice in scripting. your suggestions are most welcome..please help Cheers!! (4 Replies)
Discussion started by: munishdh
4 Replies

2. UNIX for Dummies Questions & Answers

How to change the file modification time of a file on nfs mount point

Hi I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file. So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Discussion started by: deepthi.s
6 Replies

3. Shell Programming and Scripting

Displaying the Last Modification Time of a specific file

How can I get and display the last modification time of a file? in scripting or specifically using Batch file I want this info for me to determine whether an image has been edited or not by using the last modification time and compare it to our stored date of modification. can somebody help... (5 Replies)
Discussion started by: jaque18
5 Replies

4. Shell Programming and Scripting

How to read specific line of text from a Script and send email notification

Hi ! I am a newbie and never officially wrote a shell script before. The requirement for this script is : 1) Read a file called 'bpm.log' and identify if it has a specific text such as 'this is the text'. Its a static value and that is the only text we need to read. 2) If that... (2 Replies)
Discussion started by: atechcorp
2 Replies

5. Shell Programming and Scripting

how to change specific value for a entry in the file

Hello All, can someone please suggest me a one line command to change a specific value that is associated to an entry in the file. for example #more schedulefile quartz.job.manual.bonus.schedule=0 0 9 ? * * # it should be changed to #more schedulefile... (5 Replies)
Discussion started by: bobby320
5 Replies

6. Shell Programming and Scripting

Replacing specific entry using sed

Hi guys, I'm new to bash programming, so please pardon me. I'm trying to replace an entry's text in Books.txt This code works perfectly: sed -i "s/$BookTitle/$NewBookTitle/g" Books.txt But problem is, if there are double entries, it will also replace that entry. For example: ... (12 Replies)
Discussion started by: todaealas
12 Replies

7. UNIX for Dummies Questions & Answers

Check for entry of specific pattern

Hey Guys and Gals, I am having trouble with what I thought shouldn't be hard.. In a script I am working on there is a need to enter a MAC address. MAC addresses are formatted ; XX:XX:XX:XX:XX:XX where X can be 0-9, a-f or A-F So in the sample script the query is something... (4 Replies)
Discussion started by: TAPE
4 Replies

8. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

9. Programming

PYTHON COPY Contents of file1 into a specific entry in file2

file1 cat dog fish file2 This is a bunch of lines <!-- INSERT ANIMALS HERE --> horse cheetah post results file2 This is a bunch of lines <!-- INSERT ANIMALS HERE --> cat dog fish horse (1 Reply)
Discussion started by: TY718
1 Replies

10. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies
tran_reset_notify(9E)						Driver Entry Points					     tran_reset_notify(9E)

NAME
tran_reset_notify - request to notify SCSI target of bus reset SYNOPSIS
#include <sys/scsi/scsi.h> int prefixtran_reset_notify(struct scsi_address *ap, int flag, void (*callback, caddr_t),caddr_t arg); INTERFACE LEVEL
Solaris architecture specific (Solaris DDI). PARAMETERS
ap Pointer to the scsi_address(9S) structure. flag A flag indicating registration or cancellation of a notification request. callback A pointer to the target driver's reset notification function. arg The callback function argument. DESCRIPTION
The tran_reset_notify() entry point is called when a target driver requests notification of a bus reset. The tran_reset_notify() vector in the scsi_hba_tran(9S) structure may be initialized in the HBA driver's attach(9E) routine to point to the HBA entry point to be called when a target driver calls scsi_reset_notify(9F). The argument flag is used to register or cancel the notification. The supported values for flag are as follows: SCSI_RESET_NOTIFY Register callback as the reset notification function for the target. SCSI_RESET_CANCEL Cancel the reset notification request for the target. The HBA driver maintains a list of reset notification requests registered by the target drivers. When a bus reset occurs, the HBA driver notifies registered target drivers by calling the callback routine, callback, with the argument, arg, for each registered target. RETURN VALUES
For SCSI_RESET_NOTIFY requests, tran_reset_notify() must return DDI_SUCCESS if the notification request has been accepted, and DDI_FAIL- URE otherwise. For SCSI_RESET_CANCEL requests, tran_reset_notify() must return DDI_SUCCESS if the notification request has been canceled, and DDI_FAILURE otherwise. SEE ALSO
attach(9E), scsi_ifgetcap(9F), scsi_reset_notify(9F), scsi_address(9S), scsi_hba_tran(9S) Writing Device Drivers SunOS 5.11 30 Aug 1995 tran_reset_notify(9E)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy