Asking questions is not an insult! We are here to help you learn how to use the tools available on your system. And, your attempt was very close to working. There were only two small problems:
you can't assign a value to a positional parameter using $2=string, and
you need to use a $ to expand the contents of a shell variable.
So, if you change your script to something more like:
You should get the results you want when you run your script. The backquotes you are using for command substitution are obsolescent. The preferred method would be:
but either form will work for now.
If that works for you, you can then think about replacing the echo "change" with a command to send yourself mail. But, unless you are scheduling this script to run when you're are there to see the results, there isn't any reason to do that.
This User Gave Thanks to Don Cragun For This Post:
Hi all,
I am kinda puzzled. When and Why do we use md5sum? I've read man pages for mp5sum, but didn't get anything out of it. Please, can someone explain this to me in couple of words.
Thank you all. (1 Reply)
i downloaded a Linux distribution from a FTP site today, and i found there is a file named MD5SUM in the same directory, with the following contents:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
c9a4d963a49e384e10dec9c2bd49ad73 valhalla-SRPMS-disc1.iso
41b03d068e84d2a17147aa27e704f79b ... (1 Reply)
Is it possible to call the unix command md5sum from within a C program. I am trying to write a C program that scans a directory and computes the MD5Sum of all the files in the directory. Whenever I use md5sum 'filename' I get the error 'md5sum undeclared'. Is there a header file or some library... (3 Replies)
something strange is that i find the md5sum command in different linux generate different result, for example, i have tried the same file in CentOS and Rhel, The md5 results are different, it is quite headache, who know the tricks? (3 Replies)
Hello,
I need to download multiple files from an FTP server but occasionally they arrive in error so I need to perform an integrity check. I've been attempting to write a bash script that does the following:
Downloads all files including those in sub directories
Perform md5sum using... (4 Replies)
And not to start. I can compare files, that's easy. The problem is that I compare files in a directory, and check if these files exist in another directory. The problem is that the file names are not the same. So I have to compare with "md5sum" or something similar. How I can do?
All this in... (7 Replies)
I'm trying to think of a way to compare two boxes and make sure their files will be the same. There may be extra files on one side and some on the other.
I also need to make sure the file content is identical.
So far I've gotten this to create a file
find /directorypath/ -type f -name... (3 Replies)
I'm running on a staging server. I will need to use expect and I think ssh or scp to the other boxes.
I need to see something like this....Enter:Host 1
Enter:Host 2
Enter full directory path to compare: example /apps/acd/jboss-customer1/
Enter User Id:
Enter Password:
( Assumes... (6 Replies)
I am getting No such file or directory if my variable contains white spaces... Is there a way to fix this?
This works
x="1.md5"
md5sum -c "$x"
This, does not
x="23\ 5\ 6\ 7\ 8\ 9\ 10.md5"
md5sum -c "$x"
md5sum: '23\ 5\ 6\ 7\ 8\ 9\ 10.md5': No such file or directory
How do I fix... (1 Reply)
Discussion started by: soichiro
1 Replies
LEARN ABOUT SUNOS
gst-md5sum
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)