• Delete lines of text

    From Killroy@VERT/CATACOMB to All on Monday, January 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?


    ---
    þ Synchronet þ The Catacomb BBS - catacombbbs.dyndns.org
  • From Digital Man@VERT to Killroy on Monday, January 07, 2008 22:39:36
    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 þ [vert/cvs/bbs].synchro.net
  • From Killroy@VERT/CATACOMB to Digital Man on Tuesday, January 08, 2008 12:22:00
    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 Tuesday, January 08, 2008 13:22:00
    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 Tuesday, January 08, 2008 20:18:00
    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 Tuesday, January 08, 2008 17:40:48
    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 þ [vert/cvs/bbs].synchro.net
  • From Killroy@VERT/CATACOMB to Angus McLeod on Tuesday, January 08, 2008 22:00:00
    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 Thursday, January 10, 2008 00:03:00
    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 Thursday, January 10, 2008 00:09:00
    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 Jason Hud@VERT to Killroy on Tuesday, January 08, 2008 16:51:58
    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 þ [vert/cvs/bbs].synchro.net
  • From Ragnarok@VERT/DOCKSUD to Angus McLeod on Friday, January 11, 2008 20:05:00
    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 Digital Man on Saturday, January 12, 2008 00:24:42
    To: Digital Man
    > '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.zi includes a Win32 build of sed.




    a while back i mentioned to you that i used ndos for its GLOBAL command,
    which preforms a command on all files and files in the sub dirs.

    you mentioned that you had a similar program that did the same thing?
    do you recall the name and where one could pick it up?

    .Ä.Ú Â Â ÂÂ.Ä. ÂÚ¿
    -³ ³Ã¿³ ³³ ³³³ ³³ ³À¿-
    `Ä'ÀÙÁÙÁ`\/'Á`Ä'À-ÙÀÙ
    +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 þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Jason Hud on Saturday, January 12, 2008 10:39:38
    Re: utils
    By: Jason Hud to Digital Man on Sat Jan 12 2008 12:24 am

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




    a while back i mentioned to you that i used ndos for its GLOBAL command, which preforms a command on all files and files in the sub dirs.

    you mentioned that you had a similar program that did the same thing?
    do you recall the name and where one could pick it up?

    I have a 16-bit DOS program called sweep.exe, I think it can from a PCMag utility set, which will execute a specific command-line in each sub-directory of the current directory, recursively. I also have a Win32 program called 'each', which I wrote and executes a specified command-line for every file in the current directory, but it doesn't recurse. So I don't think either of these program do what GLOBAL does, but perhaps a combination of the 2 would (with 16-bit limitations). Probably not what you're looking for.

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #71:
    There is a town called "Big Ugly" in West Virginia.
    Norco, CA WX: ---.-øF, --% humidity, NaN mph --- wind, --.-- inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Angus McLeod@VERT/ANJO to Digital Man on Saturday, January 12, 2008 15:36:00
    Re: utils
    By: Digital Man to Jason Hud on Sat Jan 12 2008 10:39:00

    a while back i mentioned to you that i used ndos for its GLOBAL command, which preforms a command on all files and files in the sub dirs.

    you mentioned that you had a similar program that did the same thing?
    do you recall the name and where one could pick it up?

    I have a 16-bit DOS program called sweep.exe, I think it can from a PCMag utility set, which will execute a specific command-line in each sub-director of the current directory, recursively. I also have a Win32 program called 'each', which I wrote and executes a specified command-line for every file i the current directory, but it doesn't recurse.


    find /base/directory -name "filespec" -exec yourcommand '{}' \;

    :-)

    ---
    Playing: "Here" by "VAST" from the "Visual Audio Sensory Theatre" album.

    ---
    þ Synchronet þ Where we BAJA Rob into writing our modules. The ANJO BBS
  • From Deuce@VERT/SYNCNIX to Digital Man on Saturday, January 12, 2008 13:41:00
    Re: utils
    By: Digital Man to Jason Hud on Sat Jan 12 2008 10:39 am

    you mentioned that you had a similar program that did the same thing?
    do you recall the name and where one could pick it up?

    I have a 16-bit DOS program called sweep.exe, I think it can from a PCMag utility set, which will execute a specific command-line in each sub-directory of the current directory, recursively. I also have a Win32 program called 'each', which I wrote and executes a specified command-line for every file in the current directory, but it doesn't recurse. So I don't think either of these program do what GLOBAL does, but perhaps a
    combination of the 2 would (with 16-bit limitations). Probably not what you're looking for.

    Sounds like he's looking for a Windows version of the unix find utility... which is probably included with that unix utilities bundle on sourceforge.

    ---
    Synchronet - Jump on the Web 0.2 bandwagon!

    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From MRoblivious1bmf@VERT to Digital Man on Sunday, January 13, 2008 00:12:04
    To: Digital Man
    .,: This is something about utils,
    Digital Man said it to Jason Hud on Sat Jan 12 2008 04:39 pm --ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ-ÄÄÄÄ---ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ---ÄÄÄÄÄÄÄÄÄ--ÄÄÄÄÄÄÄÄ
    'each', which I wrote and executes a specified command-line for every file i the current directory, but it doesn't recurse. So I don't think either of th program do what GLOBAL does, but perhaps a combination of the 2 would (with 16-bit limitations). Probably not what you're looking for.


    ah, found sweep.exe and also found a program called global.exe which does the same thing with a few more features.

    hate to give ndos.com the boot, there's a lot of useful things it can do.

    Sometimes i forget to do cmd /c for the functions and filenames get
    truncated, though.

    never liked 4nt.

    |15 .Ä.Ú Â Â ÂÂ.Ä. ÂÚ¿
    |07-³ ³Ã¿³ ³³ ³³³ ³³ ³À¿-
    |07 `Ä'ÀÙÁÙÁ`\/'Á`Ä'À-ÙÀÙ
    |08øùú.[|04Edge of oblivion bbs |12eob-bbs.com|08].úùø|15


    --- Synchronet 3.14a-Win32 NewsLink 1.85
    * eob - Racine, WisconSIN - telnet://eob-bbs.com
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MRoblivious1bmf@VERT to Deuce on Sunday, January 13, 2008 00:15:38
    To: Deuce
    .,: This is something about utils,
    Deuce said it to Digital Man on Sat Jan 12 2008 07:41 pm --ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ-ÄÄÄÄ---ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ---ÄÄÄÄÄÄÄÄÄ--ÄÄÄÄÄÄÄÄ
    Sounds like he's looking for a Windows version of the unix find utility... which is probably included with that unix utilities bundle on sourceforge.

    me?

    didnt think that version of find was for executing commands on files in recursive dirs\

    i have several copycat unix utils and my copy of find doesnt do that.

    |15 .Ä.Ú Â Â ÂÂ.Ä. ÂÚ¿
    |07-³ ³Ã¿³ ³³ ³³³ ³³ ³À¿-
    |07 `Ä'ÀÙÁÙÁ`\/'Á`Ä'À-ÙÀÙ
    |08øùú.[|04Edge of oblivion bbs |12eob-bbs.com|08].úùø|15


    --- Synchronet 3.14a-Win32 NewsLink 1.85
    * eob - Racine, WisconSIN - telnet://eob-bbs.com
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net