Prev: bash: how to flush the output from command `tee`
Next: Make stderr -> stdout & stdout -> /dev/null
From: Randal L. Schwartz on 28 Mar 2010 12:54 >>>>> "me" == me at <my.address(a)is.invalid> writes: me> Hi, me> This works great in vim, :v,^New,d me> to delete all lines that do not begin with "New" me> Please tell me the sed equiv so I can put it me> into my #!/bin/sh script that I call from the me> command line with sed -f Wrong tool. You want grep: grep -v '^New' <infile >outfile -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn(a)stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
From: Randal L. Schwartz on 28 Mar 2010 13:11 >>>>> "Randal" == Randal L Schwartz <merlyn(a)stonehenge.com> writes: >>>>> "me" == me at <my.address(a)is.invalid> writes: me> Hi, me> This works great in vim, :v,^New,d me> to delete all lines that do not begin with "New" me> Please tell me the sed equiv so I can put it me> into my #!/bin/sh script that I call from the me> command line with sed -f Randal> Wrong tool. You want grep: Randal> grep -v '^New' <infile >outfile And ugh, I read it backwards. You want to *keep* "New" lines: grep '^New' <infile >outfile -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn(a)stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
From: Sidney Lambe on 28 Mar 2010 15:42 On comp.unix.shell, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote: > Sidney Lambe wrote: > >> On comp.unix.shell, Janis Papanagnou >> <janis_papanagnou(a)hotmail.com> wrote: [delete] >> >>>>> or disable history expansion (which, however, I don't know >>>>> how is done with a C shell). >>>> >>>> Better yet, us bash, like almost everyone else. >>> >>> Hardly "almost everyone". >> >> The overwhelming majority, unix or linux, in my experience. >> It's the default shell on most linux distros and at least some >> of the unix distros. > > True for Linux. But you won't believe it; there's still a lot > commercial Unixes out there with Kornshell as default and that > don't have bash installed and the admins even not allowed to > install that bash beast. > > >> I think you hang out with more geeks than ordinary users :-) > > Probably :-) > > Though the geeks of my kind are typically called Dinosaurs, so > letting the term Geeks available free for the Linux users who > continue the crusade of Unix users against the pest and some > such. > > Janis > I, for one, am sure glad you "dinosaurs" haven't gone extinct. Linux is turning into a Windows clone (puke). I'm running an X-less Slackware here and I like it. Screen is the best window manager in existence. [delete] Sid
From: Sidney Lambe on 28 Mar 2010 17:17 On comp.unix.shell, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote: > Sidney Lambe wrote: >> On comp.unix.shell, Janis Papanagnou >> <janis_papanagnou(a)hotmail.com> wrote: [delete] >> >>>>> or disable history expansion (which, however, I don't know >>>>> how is done with a C shell). >>>> Better yet, us bash, like almost everyone else. >>> Hardly "almost everyone". >> >> The overwhelming majority, unix or linux, in my experience. >> It's the default shell on most linux distros and at least >> some of the unix distros. > > True for Linux. But you won't believe it; there's still a lot > commercial Unixes out there with Kornshell as default and that > don't have bash installed and the admins even not allowed to > install that bash beast. > >> >> I think you hang out with more geeks than ordinary users :-) > > Probably :-) > > Though the geeks of my kind are typically called Dinosaurs, so > letting the term Geeks available free for the Linux users who > continue the crusade of Unix users against the pest and some such. > > Janis Biggest mistake GNU made was developing emacs instead of going with vi and using its dual mode design and keybindings with all its utilities and apps. Now what you have is a confusing mixture of vi apps like screen and emacs apps like info. [delete] Sid
From: Arcege on 29 Mar 2010 18:12 On Mar 28, 3:42 pm, Sidney Lambe <sidneyla...(a)nospam.invalid> wrote: > On comp.unix.shell, Janis Papanagnou > > <janis_papanag...(a)hotmail.com> wrote: > > Sidney Lambe wrote: > > Though the geeks of my kind are typically called Dinosaurs, so > > letting the term Geeks available free for the Linux users who > > continue the crusade of Unix users against the pest and some > > such. > > > Janis > > I, for one, am sure glad you "dinosaurs" haven't gone extinct. > > Linux is turning into a Windows clone (puke). I'm running an X-less > Slackware here and I like it. Screen is the best window manager > in existence. > > [delete] > > Sid Here here for screen! Been using it for 20 years! As for "Linux" turning into a Windows clone, I assume you are talking about the evolution of user environments such as Gnome and KDE. This is quite off topic and to get a little preachy and to slam certain 'vil corps, my philosophy is simple: anything that gets users on to more stable, safer environments and off of crappy, proprietary, expensive computer systems, is going to be better for the users, the user community, the internet and quite probably the world in general. While Mac computer hardware is closed, the OS itself is not all that closed, it's based on OpenStep (which came from NextStep, a system I worked with in the 80's). Getting Windoze users to migrate to at least Macs, get them one step closer to more stable and safer computing, even if it is still on another super-egotist's more expensive and proprietary computer system. And that more stable, safer computing is better for the user and for the net. I'd prefer people to go to UNIX/Linux, but a large scale drive is not there right now. My wife was satisfied with Linux, except for the fact that some Windows based codecs were not available for files she received from relatives overseas. I work in a worldwide corporation where less than 0.1% of the personnel uses Linux/UNIX that I know of. We manage well enough, but there are issues because we cannot view Visio files, or have native Outlook support (an issue now with the corporate IM service and with the calendar invites) and some of the intranet apps still require IE6. Myself, I'm amazed that developers can work on winblows boxes, but they manage and I cannot convince the majority of the development or QA teams to move to Linux. I work very well on my Ubuntu box and RedHat servers. (One past company did move the development division completely to Linux however). But again, developers and system analysts usually have different needs; as much as I abhor them, developers cling to their IDEs, and most of those IDEs these days are graphical in nature. The first UNIX mainframes I was bought up on used ed with a real teletype (keyboard with paper printout) and vi with the system console. My first computer was BASIC and machine code, not assembly code; I wrote a mouse driver using a joystick. Debugging was, and often still is, with printf statments, not with gdb. So I can relate to what you are say, Sid. But there should be a 'goal' to put UNIX/Linux on more computers in the world. And to do that, it has to be more accessible to the users. I don't think that it means Linux has to be a Windoze clone, just that it has to have the same capabilities in whatever form. -Arcege
First
|
Prev
|
Pages: 1 2 3 Prev: bash: how to flush the output from command `tee` Next: Make stderr -> stdout & stdout -> /dev/null |