The problem is in Shell.c:
if (CommandLine3[0] == L'@') {
PreCommandEchoState = ShellCommandGetEchoState();
ShellCommandSetEchoState(FALSE);
Status = RunCommand(CommandLine3+1);
//
// Now restore the pre-'@' echo state.
//
ShellCommandSetEchoState(PreCommandEchoState);
}
If the command is echo, it restores the state prior to the echo command.
-----Original Message-----
From: Stephen Polkowski [mailto:[email protected]]
Sent: Tuesday, February 12, 2013 10:49 AM
To: [email protected]
Subject: Re: [edk2] @echo -off doesn't work in a script
Yes, that is my point. There is no way to hide the echo -off command in the
2.0 shell. If you use the @ with "echo -off" it will fail to disable echo for
sub-sequent commands.
file: hello.nsh
@echo -off
echo "Hello World"
output:
2.0 FS0:\> hello.nsh
2.0 FS0:\> echo "Hello World"
Hello World
2.0 FS0:\>
Is this a feature?
Thanks,
Stephen
Tim Lewis wrote:
> Laurie --
>
> Is this a bug, then? Chapter 4 of the UEFI Shell spec says: "Also, additional
> '@' before a command in a script file can prevent the current command from
> being echoed"
>
>
> -----Original Message-----
> From: Jarlstrom, Laurie [mailto:[email protected]]
> Sent: Tuesday, February 12, 2013 10:12 AM
> To: [email protected]
> Subject: Re: [edk2] @echo -off doesn't work in a script
>
> The results are different with UEFI Shell 2.0. The initial "@" needs to be
> removed for UEFI Shell 2.0.
>
> thanks,
> Laurie
>
> [email protected]
> EFI / Framework Technical
> Marketing Engineering Team
> (503) 712-9395
>
> -----Original Message-----
> From: Jarlstrom, Laurie [mailto:[email protected]]
> Sent: Tuesday, February 12, 2013 9:55 AM
> To: [email protected]
> Subject: Re: [edk2] @echo -off doesn't work in a script
>
> I just tried the attached scripts on the UDK2010.SR1.UP1 Nt32 emulation and
> the shell "echo" worked as per the screen capture attached Try the scripts
> attached.
>
>
> thanks,
> Laurie
>
> [email protected]
> EFI / Framework Technical
> Marketing Engineering Team
> (503) 712-9395
> -----Original Message-----
> From: Stephen Polkowski [mailto:[email protected]]
> Sent: Tuesday, February 12, 2013 9:19 AM
> To: [email protected]
> Subject: [edk2] @echo -off doesn't work in a script
>
> Hi all,
>
> Shouldn't @echo -off work in a .nsh script. It doesn't on the latest
> UDK2010.SR1.UP1 shell. It only hides the echo -off command. The commands
> that follow it are echoed to the screen.
>
> Am I missing something.
>
> Thanks in advance,
>
> Stephen
>
>
> ----------------------------------------------------------------------
> --------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013 and get the
> hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
> ----------------------------------------------------------------------
> --------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013 and get the
> hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
> ----------------------------------------------------------------------
> --------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013 and get
> the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
--
Stephen Polkowski
Centaur Technology
Austin, TX
(512) 418-5730
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 and get the
hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel