11-05-2012
Quote:
Originally Posted by
bipinajith
I am not sure if I can recommend another smart approach, but I believe my approach will run much faster than pamu's script since he/she is using looping structures.
Did you try running both & check if you are getting the desired results?
Yes, I'm working on that. Thank you. I will make a response later.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can any one pelase tell me how to grep multiple strings from multiple files in a singel folder?
grep -E "string1|string2|string3|string4|string..."
its taking lots of time..
can any please tell me fast grep???
URGENT (10 Replies)
Discussion started by: durgaprasad
10 Replies
2. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
3. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
5. UNIX Desktop Questions & Answers
Hi
I'm sure there's a way to do this, but I ran out of caffeine/talent before getting the answer in a long winded alternate way (don't ask ;) )
The task I was trying to do was scan a directory of files and show only files that contained 3 values:
I940
5433309
2181
I tried many variations... (4 Replies)
Discussion started by: callumw
4 Replies
6. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
7. Shell Programming and Scripting
I have a script that periodically checks the Apache error_log to search for a specific error that causes it to hand and, if found, it restarts the service.
I recently found another error that forces it to hand and won't serve pages until it is reset. What I'm trying to do is to get the script to... (3 Replies)
Discussion started by: cfjohnsn
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file containing list of strings like
i:
Pink
Yellow
Green
and I have file having list of file names in a directory
j :
a
b
c
d
Where j contains of a ,b,c,d are as follows
a:
Pink (3 Replies)
Discussion started by: madabhg
3 Replies
9. Shell Programming and Scripting
Hi All,
I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results.
#!/bin/ksh
(
a="/path/file1"
b="path/file2"
for file in... (4 Replies)
Discussion started by: am24
4 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone ,
Iam a newbie to shell programming and iam reaching out if anyone can help in this :-
I have two files
1) Insert.txt
2) partition_list.txt
insert.txt looks like this :-
insert into emp1 partition (partition_name)
(a1,
b2,
c4,
s6,
d8)
select
a1,
b2,
c4, (2 Replies)
Discussion started by: nubie2linux
2 Replies
LEARN ABOUT SUSE
htmlclean
HTMLCLEAN(1) User Contributed Perl Documentation HTMLCLEAN(1)
NAME
htmlclean - a small script to clean up existing HTML
SYNOPSIS
htmlclean [-v] [-V] file1 [file2 file3 ...]
DESCRIPTION
This program provides a command-line interface to the HTML::Clean module, which can help you to provide more compatible, smaller HTML files
at the expense of reducing the human readability of the HTML code. In some cases you may be able to reduce the size of your HTML by up to
50%!
The HTML::Clean library provides a number of features that improve your HTML for browsing and serving:
htmlclean passes each file given on the command line to the library and writes out the new HTML according to the specified options. The
default is to create a backup file and replace the file with cleaned HTML.
Removing whitespace, Comments and other useless or redundant constructs
Insuring that font tags work across multiple operating systems
For full details see the documentations for HTML::Clean itself.
OPTIONS
"-V"
Print the version of the program.
"-v"
Verbose mode. Print out the original and final file sizes, plus the compression percent. For example:
5261 4065 22% /tmp/development-es.html
5258 4061 22% /tmp/development-fr.html
4651 3683 20% /tmp/development.html
SEE ALSO
For the library, see HTML::Clean
AUTHOR
"htmlclean" is written by Paul Lindner, <paul.lindner@itu.int>
COPYRIGHT
Copyright (c> 1998 by ITU under the same terms as Perl.
perl v5.12.1 1999-01-17 HTMLCLEAN(1)