Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > gnu.utils.bug > #2211
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | xyz2041 <xyz2041@gmail.com> |
| Newsgroups | gnu.utils.bug |
| Subject | Re: Just want to exclude lines with tabs |
| Date | Thu, 19 May 2016 22:19:45 -0500 |
| Lines | 40 |
| Approved | bug-gnu-utils@gnu.org |
| Message-ID | <mailman.195.1463714391.6543.bug-gnu-utils@gnu.org> (permalink) |
| References | <CAAY=KgOd0CYkx43xZ7WQ1SFj3mABziKEiueN6JohZvHM0rin5Q@mail.gmail.com> <201605192121.u4JLLI4b005478@freefriends.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | usenet.stanford.edu 1463714392 14957 208.118.235.17 (20 May 2016 03:19:52 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-gnu-utils@gnu.org |
| To | Karl Berry <karl@freefriends.org> |
| Envelope-to | bug-gnu-utils@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=exz5BBnmi2izKl3QpFkP+9bD8rQz67EGyrTxfxsGHVM=; b=xrsqGPbYzdVjOW/M3vCG8fcBAsvD59Bb2n3V1vpnNH1YAfNLVbwlrhdSMBP1N8wIY6 s0IMZnRCjxj6Ad3yShKGg8WQQRwsCutEmnXV2Uv6K6A3l0XJ9P1d9NmwFW6qAeKUCBhg f3GPoyvNbjgxgTmcAs66BU6S55ZmbHofC1WNe/K5BJZpC4kss0PQERvtl79gPjN3D0ha WDlJwcxOi0x+IUD5PbDP4ccJSDlz/V9vm+J0w8vnqXwxfmwTR4lv9TCjYg+p2GAfcBUd KETxihmXwmbeDlpiVJZccGRzSAtDTRoefF6oRf/kr4yqlI+OjZ+yMClNYMcFXuZ+MV+x 811g== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=exz5BBnmi2izKl3QpFkP+9bD8rQz67EGyrTxfxsGHVM=; b=CDRN7RnJowIfZLI2cQUFQ57atTIOW1YMjQ5oy4+urBJ3POORsvySM+qdj5c28iX0v1 qMPL8L57paBrwjgpnlQW0+BfZkdwi2LJfynYhyySKy1O0jOBM1wAzM6VWYAeE+vaR6b5 q1IKzGcnoDaQyaDhQ9viqz8UP71SwnW3WmIoAi+DNRUVjOUMj2Rmd31E4iD8QEyzo0Hl O6grhPmz3/x3i3MWYqhEnUvXURFWlNihykLgRXeAGto7G1bt8hnULa6gHAbpTUrmNlPN bKnmHo4DvIK6IyZ/RxKqKUqtZbiAfR+pIK+qJwiP1f19sjNeZEERBj7Rge+nD7EQyG4K 2MQQ== |
| X-Gm-Message-State | AOPr4FWhtocfeUtwXyUVS16RI52vyktLUI6Fj6PK0IWvwQluP/v9lPpYzQ1gInfX+wXaqfdBCDiJInSnLh61qA== |
| X-Received | by 10.176.6.168 with SMTP id g37mr437181uag.34.1463714385805; Thu, 19 May 2016 20:19:45 -0700 (PDT) |
| In-Reply-To | <201605192121.u4JLLI4b005478@freefriends.org> |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] |
| X-Received-From | 2607:f8b0:400c:c05::230 |
| X-BeenThere | bug-gnu-utils@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU utilities <bug-gnu-utils.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-gnu-utils/> |
| List-Post | <mailto:bug-gnu-utils@gnu.org> |
| List-Help | <mailto:bug-gnu-utils-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-gnu-utils>, <mailto:bug-gnu-utils-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.utils.bug:2211 |
Show key headers only | View raw
Thanks, everyone. I just couldn't get Windows command line to let me put a tab on the line, so I wrote a batch file: set TAB= grep -v "%TAB%" %1.%2 > %1-NoTabs.csv grep -v "," %1.%2 > %1-NoCmas.tab Just hit the tab key after "set TAB=". Not elegant but it works. grep version: K:\>grep -V grep (GNU grep) 2.5.1 Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MD5: bb350a9ac2236b3e29f2229e77709f40 Thanks, again! On 5/19/16, Karl Berry <karl@freefriends.org> wrote: > grep "$(printf '\t')" o.csv > > It seems to me this should have worked, unless your shell's quoting got > rid of the \ before printf could see it. Certainly this works: > > tab=`printf '\t'` # or $(...), whatever > grep "$tab" somefile > > This assignment of special characters to shell variables and then using > the variable in subsequent commands is the most portable (across decades > and "improvements" in standards, shells, systems, ...) approach I know > of. FWIW. -k > >
Back to gnu.utils.bug | Previous | Next — Next in thread | Find similar
Re: Just want to exclude lines with tabs xyz2041 <xyz2041@gmail.com> - 2016-05-19 22:19 -0500 Re: Just want to exclude lines with tabs Manuel Collado <mcollado@domain.invalid> - 2016-05-20 18:54 +0200
csiph-web