Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Any programs to trim white space/ remove all white space in HTML file?

Reply
Thread Tools

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

 
 
Ben C
Guest
Posts: n/a
 
      01-26-2007
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
 
Reply With Quote
 
 
 
 
J.O. Aho
Guest
Posts: n/a
 
      01-26-2007
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
 
Reply With Quote
 
 
 
 
J.O. Aho
Guest
Posts: n/a
 
      01-26-2007
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
 
Reply With Quote
 
Eric Layman
Guest
Posts: n/a
 
      01-26-2007
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
 
Reply With Quote
 
Eric Layman
Guest
Posts: n/a
 
      01-27-2007
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
 
Reply With Quote
 
Eric Layman
Guest
Posts: n/a
 
      01-27-2007
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
 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      01-28-2007
Eric Layman wrote:
> Are there any scripts or tools to trim/remove all white spaces in a
> html/php/ scripts file?


Areyousureyouwanttodothat?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 2 04-24-2007 01:59 AM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 26 02-26-2007 05:06 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 6 12-25-2006 08:47 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 0 10-25-2006 11:00 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 0 08-28-2006 11:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57