Shell script problem

Vijay Shanker Dubey vijay.shad at gmail.com
Tue Mar 2 07:20:46 UTC 2010


please read inline

Regards,
Vijay Shanker Dubey



On Tue, Mar 2, 2010 at 12:18 PM, Patton Echols <p.echols at comcast.net> wrote:

> On 03/01/2010 08:19 AM, James Kaufman wrote:
> > On 3/1/2010 8:13 AM, Vijay Shanker Dubey wrote:
> >
> > Perhaps I am wrong. One thing you can try is to run your shell command
> > like this:
> >
> > sh -x ./join_files.sh
> >
> >
>
>
> Sticking my nose in.  I had some small avi files laying around and ran
> the script against them with the sh -x switch as suggested.  (Tried it
> with both #!/bin/sh and #!/bin/bash with the same results.  For ease of
> reading the  files are named three.avi, four.avi, and five.avi  (very
> original)  The output is pasted below my comments.
>
> Some things I noticed.
>
> First, the declare command at the beginning of the script throws a "not
> found"  Is that an error?
>
> Second, the script / shell is able to find the files because it
> successfully finds them to verify type.
>
> Third, I get the same "not found" error as vijay on each avi file name.
> But from the above, I think that there is something wrong with assigning
> the file name to the array.  THAT is what is "not found" not the file
> itself.
>
>
I have got the same problem. and has found the solution. That goes here
see the first line of script

#!/bin/sh

and change it to

#!/bin/bash

and your array will be made.


>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100302/246f0d6f/attachment.html>


More information about the ubuntu-users mailing list