• Delete lines of text

    From Killroy@VERT/CATACOMB to All on Mon Jan 7 20:58:00 2008
    I am looking to create a simple script that will delete the first and last lines of an ANSI file. Does anyone have any ideas?


    ---
    ■ Synchronet ■ The Catacomb BBS - catacombbbs.dyndns.org
  • From Digital Man@VERT to Killroy on Mon Jan 7 22:39:00 2008
    Re: Delete lines of text
    By: Killroy to All on Mon Jan 07 2008 08:58 pm

    I am looking to create a simple script that will delete the first and last lines of an ANSI file. Does anyone have any ideas?

    And you need this script to be written in Baja?

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #18:
    A jellyfish is 95% water.
    Norco, CA WX: ---.-°F, --% humidity, NaN mph --- wind, --.-- inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Killroy@VERT/CATACOMB to Digital Man on Tue Jan 8 12:22:00 2008
    Re: Delete lines of text
    By: Digital Man to Killroy on Mon Jan 07 2008 10:39 pm

    I am looking to create a simple script that will delete the first and las lines of an ANSI file. Does anyone have any ideas?

    And you need this script to be written in Baja?

    I guess it doesn't really have to be. A simple batch file would probably suffice.


    ---
    ■ Synchronet ■ The Catacomb BBS - catacombbbs.dyndns.org
  • From Angus McLeod@VERT/ANJO to Killroy on Tue Jan 8 13:22:00 2008
    Re: Delete lines of text
    By: Killroy to All on Mon Jan 07 2008 20:58:00

    I am looking to create a simple script that will delete the first and last lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    :-)

    ---
    Playing: "Empty" by "The Cranberries" from the "No need to argue" album.
    ■ Synchronet ■ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From Killroy@VERT/CATACOMB to Angus McLeod on Tue Jan 8 20:18:00 2008
    Re: Delete lines of text
    By: Angus McLeod to Killroy on Tue Jan 08 2008 01:22 pm

    I am looking to create a simple script that will delete the first and las lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    Does't work. Is this a UNIX command?


    ---
    ■ Synchronet ■ The Catacomb BBS - catacombbbs.dyndns.org
  • From Digital Man@VERT to Killroy on Tue Jan 8 17:40:00 2008
    Re: Delete lines of text
    By: Killroy to Angus McLeod on Tue Jan 08 2008 08:18 pm

    Re: Delete lines of text
    By: Angus McLeod to Killroy on Tue Jan 08 2008 01:22 pm

    I am looking to create a simple script that will delete the first and lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    Does't work. Is this a UNIX command?

    'sed' traditionally comes with *nixes, but you can also get it for Windows. e.g. http://sourceforge.net/project/showfiles.php?group_id=9328, unxutils.zip includes a Win32 build of sed.

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #20:
    Broccoli is the only vegetable that is also a flower.
    Norco, CA WX: ---.-°F, --% humidity, NaN mph --- wind, --.-- inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Killroy@VERT/CATACOMB to Angus McLeod on Tue Jan 8 22:00:00 2008
    Re: Delete lines of text
    By: Killroy to Angus McLeod on Tue Jan 08 2008 08:18 pm

    I am looking to create a simple script that will delete the first and lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    Does't work. Is this a UNIX command?

    It is now moot. I found a VBS that does what I want but it seems like Smegzot has some code that removes the CTRL-L in the file. I will have to put up with that annoying "SmegZOT v1.00 aRf" and "SmegWARE [Registered] in my logon.asc.


    ---
    ■ Synchronet ■ The Catacomb BBS - catacombbbs.dyndns.org
  • From Angus McLeod@VERT/ANJO to Killroy on Thu Jan 10 00:03:00 2008
    Re: Delete lines of text
    By: Killroy to Angus McLeod on Tue Jan 08 2008 20:18:00

    I am looking to create a simple script that will delete the first and lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    Does't work. Is this a UNIX command?

    You can get 'sed' for windows. But I suppose, since it's usually a part
    of a base UNIX install, the answer is "yes".

    ---
    Playing: "I'm tired" by "Bernard Butler" from the "People move on" album.
    ■ Synchronet ■ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From Angus McLeod@VERT/ANJO to Killroy on Thu Jan 10 00:09:00 2008
    Re: Delete lines of text
    By: Killroy to Angus McLeod on Tue Jan 08 2008 22:00:00

    I will have to put up with that annoying "SmegZOT v1.00 aRf" and
    "SmegWARE [Registered] in my logon.asc.

    So the man from Kamloops is no longer appreciated! Pore ole Darryl.

    Well, maybe you could try

    grep -v "\(SmegZOT\|SmegWARE\)" inputfile > outputfile

    and see if... Oh. Sorry, I forgot.

    ---
    Playing: "I'd do it again if I could" by "Bernard Butler"
    from the "Friends & lovers" album.
    ■ Synchronet ■ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From Ragnarok@VERT/DOCKSUD to Angus McLeod on Fri Jan 11 20:05:00 2008
    Angus McLeod escribi≤:

    Re: Delete lines of text
    By: Killroy to All on Mon Jan 07 2008 20:58:00

    I am looking to create a simple script that will delete the first and
    last lines of an ANSI file. Does anyone have any ideas?

    sed '1d;$d' filename

    :-)

    we love sed...

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar

    ---
    ■ Synchronet ■ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Jason Hud@VERT to Killroy on Tue Jan 8 16:51:00 2008
    To: Killroy
    > I am looking to create a simple script that will delete the first and last
    lines of an ANSI file. Does anyone have any ideas?



    i'm thinking you have some bulletin generator and it has 'unregistered' version, or something like that.


    what i would recommend is a text replacement program that you can put in a batchfile.

    i have a great one called 'xchange' if you want it.

    if the file is always the same length, you can use sometihng like 'tail' for your windows OS

    .─.┌ ┬ ┬┬ ┬┬.─.┬ ┬┌┐
    -│ │├┐│ ││ │││ ││ │└┐-
    `─'└┘┴┘┴`\/'┴`─'└-┘└┘
    +o edge of oblivion bbs ■ eob-bbs.com
    |04An underground bbs with tons of the best games+files
    |05a zer0net node
    --- Synchronet 3.14a-Win32 NewsLink 1.85
    * Data Stream - garland texas - telnet://dsbbs.synchro.net
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net