1

I am loading using Ubuntu for beagleboard-xm sd card partition so after last stage of partition I have entered a command like this ./omap3-mkcard.sh /dev/sdX I have got

ti-lab@KILBY:~/angstrom-wrk$ ./omap3-mkcard.sh /dev/sdX 
./omap3-mkcard.sh: line 1: syntax error near unexpected token `<'
./omap3-mkcard.sh: line 1: `<HTML><HEAD>'
./omap3-mkcard.sh: Syntax error: redirection unexpected
bash: ./omap3-mkcard.sh:: No such file or directory

So how can I rectify this problem please help me

  • 3
    Where did you get the omap3-mkcard.sh file? it looks like you may have downloaded it with HTML encoding instead of as plain text. – steeldriver Mar 21 '14 at 9:18
2

steeldriver's comment makes sense. Given the line the error is on, it looks like you're trying to run an HTML file. Further I'm assuming you ran something like:

wget http://git.openembedded.org/openembedded/tree/contrib/angstrom/omap3-mkcard.sh
chmod +x omap3-mkcard.sh
./omap3-mkcard.sh ...

If you look at the source of that:

wget -O- http://git.openembedded.org/openembedded/tree/contrib/angstrom/omap3-mkcard.sh | less

... You'll see that it's HTML, not the bash script you wanted.

In future note that there's a "plain" link above the code (Github calls it "raw"). This will output a HTML-free plaintext version of the file that cau be wget-ted. So for your commands:

rm omap3-mkcard.sh  # nuke the old copy
wget http://git.openembedded.org/openembedded/plain/contrib/angstrom/omap3-mkcard.sh
chmod +x omap3-mkcard.sh
./omap3-mkcard.sh ...

Either that or you open omap3-mkcard.sh and replace it with a copy-paste from the web page.

0

Basically you have to put quotes " around all your HTML tags in your script as they also have a special meaning to the shell.

See http://www.tldp.org/LDP/abs/html/io-redirection.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.