Re: Comparing Two File Sizes
- From: jpd <read_the_sig@xxxxxxxxxxxxxxxxxxxxxx>
- Date: 6 Jan 2008 22:36:45 GMT
Begin <7a6d860a-657b-44b0-ae90-0908c303219c@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Sun, 6 Jan 2008 13:58:48 -0800 (PST), Chris <chris95008@xxxxxxxxx> wrote:
Below is the code I have so far. I'm not sure if the #!/bin/sh is
correct but I did try changing it to #!/usr/bin/perl but got
compilation errors.
Perl and shell are very different. If you want to use perl, write
perl. If you'd rather use shell, well, write that. Note that there are
numberous shells (bourne shell, bash, ash, dash, ksh, zsh, csh, tcsh,
and then a bunch more) and their syntaxes differ to greater or lesser
degree. You can find examples that work on shells used as ``/bin/sh''
on many a system upthread and in the group archives, and there's a
newsgroup devoted to ``shell programming'' as well. For perl, well,
there are a couple of newsgroups devoted to that, too.
I'm trying to compare two files and if there different then to run
some commands.
Your original question was strictly about file size, not contents. What
is it that you really want? If you do care about content, what is the
expected content? Something with a known structure like plain text[1] (and
if so, what structure?) or do you treat all files as unknown binaries?
Is mere inequality sufficient or do the differences themselves matter?
And so on, and so forth. A better problem description would be good.
[1] Yes, plain text is often pretty much unstructured in one sense, but
in another, many tools exist that depend on the minimal structure
it does have.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.
.
- References:
- Comparing Two File Sizes
- From: Chris
- Re: Comparing Two File Sizes
- From: Todd H.
- Re: Comparing Two File Sizes
- From: Chris
- Comparing Two File Sizes
- Prev by Date: Re: Comparing Two File Sizes
- Next by Date: Re: SVR4 for 386?
- Previous by thread: Re: Comparing Two File Sizes
- Next by thread: Re: Comparing Two File Sizes
- Index(es):
Relevant Pages
|
|