Any programs to trim white space/ remove all white space in HTML file?

Discussion in 'HTML' started by Ben C, Jan 26, 2007.

  1. Ben C

    Ben C Guest

    On 2007-01-26, Eric Layman <erricson@lays> wrote:
    > Hi,
    >
    > Are there any scripts or tools to trim/remove all white spaces in a
    > html/php/ scripts file?
    >
    > Thanks


    perl -pi -e 's/\s//g' *.html *.php
     
    Ben C, Jan 26, 2007
    #1
    1. Advertising

  2. Ben C

    J.O. Aho Guest

    Re: Any programs to trim white space/ remove all white space in HTMLfile?

    Ben C wrote:
    > On 2007-01-26, Eric Layman <erricson@lays> wrote:
    >> Hi,
    >>
    >> Are there any scripts or tools to trim/remove all white spaces in a
    >> html/php/ scripts file?


    > perl -pi -e 's/\s//g' *.html *.php


    sed 's/\s//g' -i *.html *.php

    --

    //Aho
     
    J.O. Aho, Jan 26, 2007
    #2
    1. Advertising

  3. Ben C

    J.O. Aho Guest

    Re: Any programs to trim white space/ remove all white space in HTMLfile?

    Eric Layman wrote:
    > Thanks.
    >
    > Would u kindly explain "sed" command please?


    From the manual:

    NAME
    sed - stream editor for filtering and transforming text

    SYNOPSIS
    sed [OPTION]... {script-only-if-no-other-script} [input-file]...

    DESCRIPTION
    Sed is a stream editor. A stream editor is used to perform basic text
    transformations on an input stream (a file or input from a pipeline).
    While in some ways similar to an editor which permits scripted edits
    (such as ed), sed works by making only one pass over the input(s), and
    is consequently more efficient. But it is sed's ability to filter text
    in a pipeline which particularly distinguishes it from other types of
    editors.

    http://unixhelp.ed.ac.uk/CGI/man-cgi?sed

    --

    //Aho
     
    J.O. Aho, Jan 26, 2007
    #3
  4. Ben C

    Eric Layman Guest

    Hi,

    Are there any scripts or tools to trim/remove all white spaces in a
    html/php/ scripts file?

    Thanks



    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
     
    Eric Layman, Jan 26, 2007
    #4
  5. Ben C

    Eric Layman Guest

    Thanks.

    Would u kindly explain "sed" command please?

    Thanks a lot.


    "J.O. Aho" <> wrote in message
    news:...
    > Ben C wrote:
    >> On 2007-01-26, Eric Layman <erricson@lays> wrote:
    >>> Hi,
    >>>
    >>> Are there any scripts or tools to trim/remove all white spaces in a
    >>> html/php/ scripts file?

    >
    >> perl -pi -e 's/\s//g' *.html *.php

    >
    > sed 's/\s//g' -i *.html *.php
    >
    > --
    >
    > //Aho




    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
     
    Eric Layman, Jan 27, 2007
    #5
  6. Ben C

    Eric Layman Guest

    Thanks

    "J.O. Aho" <> wrote in message
    news:...
    > Eric Layman wrote:
    >> Thanks.
    >>
    >> Would u kindly explain "sed" command please?

    >
    > From the manual:
    >
    > NAME
    > sed - stream editor for filtering and transforming text
    >
    > SYNOPSIS
    > sed [OPTION]... {script-only-if-no-other-script} [input-file]...
    >
    > DESCRIPTION
    > Sed is a stream editor. A stream editor is used to perform basic
    > text
    > transformations on an input stream (a file or input from a
    > pipeline).
    > While in some ways similar to an editor which permits scripted
    > edits
    > (such as ed), sed works by making only one pass over the input(s),
    > and
    > is consequently more efficient. But it is sed's ability to filter
    > text
    > in a pipeline which particularly distinguishes it from other types
    > of
    > editors.
    >
    > http://unixhelp.ed.ac.uk/CGI/man-cgi?sed
    >
    > --
    >
    > //Aho




    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
     
    Eric Layman, Jan 27, 2007
    #6
  7. Re: Any programs to trim white space/ remove all white space in HTMLfile?

    Eric Layman wrote:
    > Are there any scripts or tools to trim/remove all white spaces in a
    > html/php/ scripts file?


    Areyousureyouwanttodothat?
     
    Leif K-Brooks, Jan 28, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FAQ server
    Replies:
    0
    Views:
    173
    FAQ server
    Aug 29, 2006
  2. FAQ server
    Replies:
    0
    Views:
    160
    FAQ server
    Oct 26, 2006
  3. FAQ server
    Replies:
    6
    Views:
    250
    Jonas Raoni
    Dec 25, 2006
  4. FAQ server
    Replies:
    26
    Views:
    346
    Dr J R Stockton
    Feb 26, 2007
  5. FAQ server
    Replies:
    2
    Views:
    157
    -Lost
    Apr 24, 2007
Loading...

Share This Page