[U-Boot] help: how get last command result using scripting

Lukasz Majewski lukma at denx.de
Fri Jun 22 07:10:04 UTC 2018


Hi Michael,

> Hi all
> 
> Trying to understand how to get the last result. For example:
> sspi 1:0.3 24 700002; sspi 1:1.3 24 730000

The $? shall do the job.

=> true
=> echo $?
0
=> false
=> echo $?
1

Or have I misunderstood something?

> 
> Now I need to have the last output of the last command to compare in
> one script. Any idea?
> 
> Michael
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180622/de9a1aaa/attachment.sig>


More information about the U-Boot mailing list