Sponsored Content
Top Forums Shell Programming and Scripting sh script for file received confirmation Post 302528667 by tukuyomi on Tuesday 7th of June 2011 04:38:16 PM
Old 06-07-2011
In sh: Tweak F to your needs. A bit quick but it should work

Code:
#!/bin/sh

F='/path/to/that/certain/file'
MD5='/tmp/md5ofthatcertainfile'

[ "$(md5sum "$F")" = "$(cat "$MD5" 2>/dev/null)" ] || {
	md5sum "$F" > "$MD5"
	# Send your e-mail here
}

exit 0

Schedule it with cron (crontab -e typically)

Last edited by tukuyomi; 06-07-2011 at 05:55 PM..
This User Gave Thanks to tukuyomi For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking the time of last file received?

Hi, Is there a way of looking at the last file received and checking whether it is more than 24 hours old? E.g. /Archive/Files/h/h0012345.dat I need to look in a directory, get the date of the processed file and make sure it wasn't more than a day ago. If it is more than 1 day ago I need... (9 Replies)
Discussion started by: rebootman
9 Replies

2. Shell Programming and Scripting

How do I write a ksh script that will check if all ftp files are received?

I am trying to code a ksh script that will check to see if all 26 incoming ftp files have been received before proceeding to the next function, which is to rename each file. Here is the pseudo-code of what I am trying to do: <<STEP_1>> IF all ALS files have been transmitted then... (2 Replies)
Discussion started by: doug145
2 Replies

3. Shell Programming and Scripting

Pass all received args to a (wrapped) child script

I'm writing a wrapper script (in bash) that wraps another (bash) script. When calling the wrapped script, I need to pass all the received arguments/options to it. Is there a built in variable that holds all the options? I wrote a little while loop (see below) which works. But I wanted to know if... (1 Reply)
Discussion started by: Dilbert
1 Replies

4. Shell Programming and Scripting

twice confirmation in the script

from one script invoke another script will need to do double confirmation like: 'y' and 'y' exp: echo 'y' | /a/b/c.sh only input 1 'y' in the c.sh, but the c.sh required 2 'y' (twice confirmation) is there anyway get resolve this issue? please help (2 Replies)
Discussion started by: kinx
2 Replies

5. Linux

Run PHP script when new email received

I have been looking around for a solution to this, i have been developing for a wile though am very new to CGI, PHP and a lot of the web based tech. I have a web site hosted with a cPanel web host. I am looking to have a script(prefer PHP) to run everytime i get a new email to help@xxx.com.... (16 Replies)
Discussion started by: iKris
16 Replies

6. Programming

unexpected values received when writing and reading from file

In the code below i try to write and read from a file, but i get unexpected results, like after writing i cannot open the file, and when reading the file the value entered earlier is not shown bool creat_fragments(int nFragment) { int fd, rand_value; char frag_path, buf; for(int... (8 Replies)
Discussion started by: saman_glorious
8 Replies

7. Shell Programming and Scripting

Confirmation while deleting a file

Hi All, While am deleting a file in unix by using the command rm it's deleting the file directly IT's have to ask the user while deleting like do you want to delete filename y or N ? Kindly help on this. Thanks Thelak (2 Replies)
Discussion started by: thelakbe
2 Replies

8. Shell Programming and Scripting

How to check email with attachment received or not from UNIX shell script?

Hello Guys, Here is the requirement!! I want to check the mail with attachment received or not through unix scripting. And send an notification email when mail with attachment already received. Any thoughts on this is much appreciated!! Regards, Harry (0 Replies)
Discussion started by: dharry2017
0 Replies

9. Shell Programming and Scripting

Invoke a shell script in case mail with a specific subject is received

Hello fellow forum members, I have a script which returns a date (I can design the script to return the value in email), How can I design the script in AIX to invoke another shell script which performs some set of actions. Procmail doesnt work in AIX. (4 Replies)
Discussion started by: ektubbe
4 Replies

10. Shell Programming and Scripting

Script to find directory is getting files in every 10 mins, if not then when last time file received

Dears, I am looking for a script which will work as a watch directory. I ha directory which keep getting files in every 10 mins and some time delay. I want to monitor if the directory getting the files in every 10 mins if not captured the last received file time and calculate the delay. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
gst-md5sum-0.8(1)						   User Commands						 gst-md5sum-0.8(1)

NAME
gst-md5sum-0.8, gst-md5sum - get an md5sum of a GStreamer pipeline through md5sink SYNOPSIS
gst-md5sum-0.8 [--verbose] [gst-std-options] [partial-pipeline-description] gst-md5sum [--verbose] [gst-std-options] [partial-pipeline-description] [--gst-list-mm] [--gst-mm=string] [--print] DESCRIPTION
gst-md5sum-0.8 generates MD5 checksums of the data generated by a GStreamer pipeline. In theory, both of the following commands should print out the same checksum: gst-md5sum-0.8 filesrc location=music.mp3 md5sum music.mp3 If the pipeline contains an md5sink element, gst-md5sum-0.8 queries it for the md5sum at the end of pipeline iteration. If the pipeline does not contain an md5sink element, gst-md5sum-0.8 automatically connects an md5sink to the right-hand side of the given pipeline. See gst-launch(1) or the GStreamer documentation for more information on how to create a partial-pipeline-description. gst-md5sum is a wrapper script that runs the latest installed version of gst-md5sum-X.X. For example, if both gst-md5sum-0.7 and gst- md5sum-0.8 are installed on your system, gst-md5sum runs gst-md5sum-0.8. OPTIONS
The following options are supported by gst-md5sum-0.8 and gst-md5sum: --verbose Output verbose information. You can also use -v to specify this option. gst-std-options Standard options available for use with most GStreamer applications. See gst-std-options(5) for more information. The following options are supported by gst-md5sum only: --gst-list-mm List found major/minor versions. This option displays the versions that are available. --gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the default version. --print Print wrapped command line. This option displays the command that will be run, and then runs the command. OPERANDS
The following operands are supported: partial-pipelinePartialppipeline description. EXAMPLES
Example 1: Running the Wrapper Script and Displaying the Command Name example% gst-md5sum --print /usr/bin/gst-md5sum-0.8 FILES
The following files are used by this application: /usr/bin/gst-md5sum-0.8 Executable for GNOME help browser /usr/bin/gst-md5sum Wrapper script that runs the latest installed version of gst-md5sum-X.X ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-media | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gst-complete(1), gst-compprep(1), gst-feedback(1), gst-inspect(1), gst-launch(1), gst-launch-ext(1), gst-register(1), gst-thumbnail(1), gst-typefind(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3), gst-std-options(5) NOTES
Original man page written by the GStreamer team at http://gstreamer.net/. Updated by Brian Cameron, Sun Microsystems Inc., 2004. SunOS 5.10 14 Oct 2004 gst-md5sum-0.8(1)
All times are GMT -4. The time now is 04:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy