[yocto] Unexpected redirection error in script

Chris Tapp opensource at keylevel.com
Mon Aug 25 13:05:09 PDT 2014


On 25 Aug 2014, at 18:07, Maciej Borzecki <maciej.borzecki at open-rnd.pl> wrote:

> On Monday 25 of August 2014 17:50:00 Chris Tapp wrote:
>> I've previously used expressions of the form:
>> 
>>   IFS=. read -r $a $b $c $d <<< "$IP"
> try:
> 
> echo "$IP" | IFS=. read -r a b c d
> 
>> 
>> to split an IP address into its octets.
>> 
>> However, when I try this for generic_pc under daisy I get an "Unexpected
>> redirection" error.
>> 
>> Is this to do with the Busybox version/configuration or something else?
> Busybox uses ash shell. Bash tricks like this won't work.

Thanks - I hadn't spotted that the Cedartrail BSP links /bin/sh to /bin/bash and not the Busybox binary.

> -- 
> 
> Maciej Borzęcki 
> Senior Software Engineer Open-RnD Sp. z o.o. 
> www.open-rnd.pl, Facebook, Twitter 
> mobile: +48 telefon, fax: +48 42 657 9079 
> 
> Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem lub 
> poufne informacje i została wysłana wyłącznie do wiadomości i użytku osób, do 
> których została zaadresowana. Jeśli wiadomość została otrzymana przypadkowo 
> zabrania się jej kopiowania lub rozsyłania do osób trzecich. W takim przypadku 
> uprasza się o natychmiastowe zniszczenie wiadomości oraz poinformowanie 
> nadawcy o zaistniałej sytuacji za pomocą wiadomości zwrotnej. Dziękujemy. 
> 
> This message, including any attachments hereto, may contain privileged or 
> confidential information and is sent solely for the attention and use of the 
> intended addressee(s). If you are not an intended addressee, you may neither 
> use this message nor copy or deliver it to anyone. In such case, you should 
> immediately destroy this message and kindly notify the sender by reply email. 
> Thank you.

--

Chris Tapp
opensource at keylevel.com
www.keylevel.com







More information about the yocto mailing list