B
Ben C
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
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
Eric said:Thanks.
Would u kindly explain "sed" command please?
J.O. Aho said:sed 's/\s//g' -i *.html *.php
J.O. Aho said:Eric said: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
Eric said:Are there any scripts or tools to trim/remove all white spaces in a
html/php/ scripts file?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.