Shell script problem

James Kaufman ubuntu at kaufman.eden-prairie.mn.us
Mon Mar 1 16:19:04 UTC 2010


On 3/1/2010 8:13 AM, Vijay Shanker Dubey wrote:
> Hi,
>
> I have tested on multiple files, Here is the output of your command
>
> -rw-r--r-- 1 vijay vijay 726923130 2010-02-15 23:18
> /home/vijay/downloads/Reservoir/Reservoir.avi
>
> Regards,
> Vijay Shanker Dubey
>
>
>
> On Mon, Mar 1, 2010 at 7:28 PM, Ian Coetzee <ubuntu at iancoetzee.za.net
> <mailto:ubuntu at iancoetzee.za.net>> wrote:
>
>     On 2010/03/01 03:40 PM, Vijay Shanker Dubey wrote:
>      > sorry guys,
>      >
>      > have attached new  file.
>      >
>     Well looking at the script I see that it does check if the file exists.
>
>     My guess would be that it might be a permissions thing, or that the file
>     was deleted *after* it was validated.
>
>     use the command "ls -al /home/vijay/downloads/Reservoir/Reservoir.avi"
>
>     to see if the file actually *does* exist and that the permissions is
>     correct.
>
>     Afterthought is it only that file, or is there other files you have
>     tested that fails too?
>
>     Regards
>     Ian
>
>      >
>      > Regards,
>      > Vijay Shanker Dubey
>      >
>      >
>      >
>      > On Mon, Mar 1, 2010 at 7:07 PM, James Bensley
>     <jwbensley at gmail.com <mailto:jwbensley at gmail.com>
>      > <mailto:jwbensley at gmail.com <mailto:jwbensley at gmail.com>>> wrote:
>      >
>      >     Sorry for the double post, I pressed send by accident...
>      >
>      >     I think you need to send the list the join_files.sh file
>     instead as
>      >     that is the file reporting the error? As Ian suggested, the
>     file is
>      >     missing so the first port of call is going to be to locate
>     the file
>      >     and check the file path.
>      >
>      >     --
>      >     Regards,
>      >     James ;)
>      >
>      >     --
>      >     ubuntu-users mailing list
>      > ubuntu-users at lists.ubuntu.com
>     <mailto:ubuntu-users at lists.ubuntu.com>
>     <mailto:ubuntu-users at lists.ubuntu.com
>     <mailto:ubuntu-users at lists.ubuntu.com>>
>      >     Modify settings or unsubscribe at:
>      > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>      >
>      >
>

This doesn't look right to me:

for file in $FILES ; do
     echo "Going to execute command $joinCommand"
     joinCommand="$joinCommand $file"
done

If you are joining two files, A and B, that command will do something 
like this:

mencoder -oac copy -ovc copy -o OUTPUT A mencoder -oac copy -ovc copy -o 
OUTPUT B

Perhaps I am wrong. One thing you can try is to run your shell command 
like this:

sh -x ./join_files.sh

Then the shell will echo each line it executes so you can easily trace 
what it is doing.








More information about the ubuntu-users mailing list