From: krishnaLee <sssky307@163.com>
To: krishnaLee <sssky307@163.com>
Cc: Jim.Dailey@dell.com, edk2-devel@lists.01.org
Subject: Re: question about uefi shell pipe.
Date: Fri, 6 Jul 2018 11:34:59 +0800 (CST) [thread overview]
Message-ID: <6a384354.6433.1646da83e60.Coremail.sssky307@163.com> (raw)
In-Reply-To: <2c4c067c.593d.1646d8eb20d.Coremail.sssky307@163.com>
Hi,All:
may be I should reply this to EDK2 group,I had attached my file again.
After many test,my right key of "ls | grep -trim-last 0 | grep -trim-last 0" is:
1,before pipe out the buffer,trim off all in-visible wchars at end of this buffer, (the trimed of wchar is "like ASCII's range of" 0x0000~0x0020. )
2,always make sure outputBuffer[lastTwoWchar] = { 0x000A,0x000D },it will also bypass many other strange result.
thank you,
by krishna.
At 2018-07-06 11:07:05, "krishnaLee" <sssky307@163.com> wrote:
Jim,
I attached the smalltest.efi if you have not compiled the test code.
I am in developing of this grep.efi tool,I can now bypass the test-1 question by follow command:
ls | grep -trim-last 0
ls | grep -trim-last 0 | grep -trim-last 0
I also attached this grep.efi tool, it almost ok :)
//draft usage guide-------------------------------------------------
//if find ok,returncode 1,Print(string);else returncode 0;
grep.efi -find string
//get first word,
//the front and the end in-visible chars of this word will be trimed off;
grep.efi -first
//get back part after the string.
grep.efi -begin-at string
//get front part before the string
grep.efi -end-at string
//trim off first n chars at front
//before start -trim-first,the front in-visible chars will be trimed off;
grep.efi -trim-first n
//trim off back n chars at end,
//before start -trim-last,the end in-visible chars will be trimed off;
grep.efi -trim-last n
//trim off whitespace at front and end,
//trim off in-visible chars infact;
grep.efi -trim-space
thank you,
by krishna.
next prev parent reply other threads:[~2018-07-06 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 9:15 question about uefi shell pipe krishnaLee
2018-07-04 14:55 ` Andrew Fish
2018-07-05 0:34 ` krishnaLee
[not found] ` <a0121e33a4124122b955158310cafa98@ausx13mps335.AMER.DELL.COM>
[not found] ` <34bf3bdd.43b7.1646d5dd393.Coremail.sssky307@163.com>
[not found] ` <2c4c067c.593d.1646d8eb20d.Coremail.sssky307@163.com>
2018-07-06 3:34 ` krishnaLee [this message]
2018-07-09 7:17 ` Gao, Liming
2018-07-10 8:49 ` krishnaLee
2018-07-06 3:50 ` krishnaLee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a384354.6433.1646da83e60.Coremail.sssky307@163.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox