find any occurance of a string in any file???

I want to search all the files on my computer for the occurance of a 
particular string.  Before you blast me, I know, this seems silly.  But I 
have a reason.

I can use find ./ -name * to list all files, but how do I send them through 
a "grep" to find any occurance of, say, "poohead" within the files ????


Mairhtin O'Feannag

0
irishboyca (42)
10/8/2003 9:25:48 PM
comp.os.linux.misc 33625 articles. 0 followers. amosa69 (125) is leader. Post Follow

22 Replies
216 Views

Similar Articles

[PageSpeed] 55
On Wed, 08 Oct 2003 21:25:48 +0000, Mairhtin O'Feannag wrote:

> I want to search all the files on my computer for the occurance of a 
> particular string.  Before you blast me, I know, this seems silly.  But I 
> have a reason.
> 
> I can use find ./ -name * to list all files, but how do I send them through 
> a "grep" to find any occurance of, say, "poohead" within the files ????

find / -type f -exec grep -l poohead {} +

0
daveuhring (1185)
10/8/2003 9:50:13 PM
On Wed, 08 Oct 2003 21:25:48 GMT, Mairhtin O'Feannag <irishboyca@rocketmail.com> wrote:
> 
> 
> I want to search all the files on my computer for the occurance of a 
> particular string.  Before you blast me, I know, this seems silly.  But I 
> have a reason.
> 
> I can use find ./ -name * to list all files, but how do I send them through 
> a "grep" to find any occurance of, say, "poohead" within the files ????
> 
> 
> Mairhtin O'Feannag
> 

If you have GNU grep, you can do:

grep -rs  'poolhead'  /   # the r means recursive and the s silences error
                          # messages 

If not, then try something like this:

find /  -type f  -exec  grep 'poolhead' {} \;

The {} refers to whatever file find is currently focussing on.


-- 
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
0
zzzzzz (1966)
10/8/2003 9:59:12 PM
Mairhtin O'Feannag wrote:

> I want to search all the files on my computer for the occurance of a
> particular string.  Before you blast me, I know, this seems silly.  But I
> have a reason.
> 
> I can use find ./ -name * to list all files, but how do I send them
> through a "grep" to find any occurance of, say, "poohead" within the files
> ????

$ find . | xargs grep pattern

-- 
Paul Lutus
http://www.arachnoid.com

0
nospam248 (2592)
10/8/2003 10:06:41 PM
Dave Uhring wrote:

> On Wed, 08 Oct 2003 21:25:48 +0000, Mairhtin O'Feannag wrote:
> 
>> I want to search all the files on my computer for the occurance of a
>> particular string.  Before you blast me, I know, this seems silly.  But I
>> have a reason.
>> 
>> I can use find ./ -name * to list all files, but how do I send them
>> through a "grep" to find any occurance of, say, "poohead" within the
>> files ????
> 
> find / -type f -exec grep -l poohead {} +

on my system you need to do:

find / -type f -exec grep -l poohead '{}' ';'

{} means the found file, ; is the delimiter for find -exec, and they both
need quoting.

andy.

-- 
remove 'n-u-l-l' to email me. html mail or attachments will go in the spam
bin unless notified with [html] or [attachment] in the subject line.
0
news21 (108)
10/8/2003 10:07:30 PM
On Wed, 08 Oct 2003 16:50:13 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:
> 
> 
> On Wed, 08 Oct 2003 21:25:48 +0000, Mairhtin O'Feannag wrote:
> 
>> I want to search all the files on my computer for the occurance of a 
>> particular string.  Before you blast me, I know, this seems silly.  But I 
>> have a reason.
>> 
>> I can use find ./ -name * to list all files, but how do I send them through 
>> a "grep" to find any occurance of, say, "poohead" within the files ????
> 
> find / -type f -exec grep -l poohead {} +
> 

Why the  + ?

The only possibly relevant reference to + in the find man page is:

-perm +mode
              Any of the permission bits mode  are  set  for  the
              file.

And it doesn't seem to be part of a regex for grep.... 


-- 
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
0
zzzzzz (1966)
10/8/2003 10:19:12 PM
On Wed, 08 Oct 2003 22:19:12 +0000, Alan Connor wrote:

> Why the  + ?
> 
> The only possibly relevant reference to + in the find man page is:
> 
> -perm +mode
>               Any of the permission bits mode  are  set  for  the
>               file.
> 
> And it doesn't seem to be part of a regex for grep....

It came from Solaris.  I posted the wrong command ;-)

0
daveuhring (1185)
10/8/2003 10:33:56 PM
On Wed, 08 Oct 2003 17:33:56 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:
> 
> 
> On Wed, 08 Oct 2003 22:19:12 +0000, Alan Connor wrote:
> 
>> Why the  + ?
>> 
>> The only possibly relevant reference to + in the find man page is:
>> 
>> -perm +mode
>>               Any of the permission bits mode  are  set  for  the
>>               file.
>> 
>> And it doesn't seem to be part of a regex for grep....
> 
> It came from Solaris.  I posted the wrong command ;-)
> 

<chuckle>

Thanks.

-- 
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
0
zzzzzz (1966)
10/8/2003 10:59:18 PM
On Wed, 08 Oct 2003 22:59:18 +0000, Alan Connor wrote:

> On Wed, 08 Oct 2003 17:33:56 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:

>> It came from Solaris.  I posted the wrong command ;-)
>> 
> 
> <chuckle>
> 
> Thanks.

Solaris find(1):

     -exec command
           True if the executed command returns a zero  value  as
           exit  status. The end of command must be punctuated by
           an escaped semicolon (;). A  command  argument  {}  is
           replaced  by  the current path name. If the last argu-
           ment to -exec is {} and you specify + rather than  the
           semicolon  (;),  the  command  will  be  invoked fewer
           times, with {} replaced by groups of pathnames.

Makes the search run quicker.

0
daveuhring (1185)
10/8/2003 11:25:33 PM
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2003-10-08T22:06:41Z, Paul Lutus <nospam@nosite.zzz> writes:

> $ find . | xargs grep pattern

I second this.  It will be a huge win over the "find . -exec grep" syntax in
that it will spawn a vastly smaller number grep processes over the duration
of the run.
=2D --=20
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/hKQo5sRg+Y0CpvERAurgAJ0XB8pDWsTT6Etuwfy9lyhRDAHkTwCfRLI4
spgHGqo4FzL+7uRGeWML+nk=3D
=3DqPBI
=2D----END PGP SIGNATURE-----
0
kirk (233)
10/9/2003 12:00:19 AM
Mairhtin O'Feannag wrote:
> I can use find ./ -name * to list all files, but how do I send them through 
> a "grep" to find any occurance of, say, "poohead" within the files ????

$ find . -print0 | xargs -0 grep

The "-print0" arg to find and "-0" arg to xargs deal with files with
embedded newlines.

For more info on what xargs does, 
$ man xargs 

Ed

0
news20 (49)
10/9/2003 12:45:25 AM
On Thu, 09 Oct 2003 00:00:19 GMT, Kirk Strauser <kirk@strauser.com> wrote:
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> At 2003-10-08T22:06:41Z, Paul Lutus <nospam@nosite.zzz> writes:
> 
>> $ find . | xargs grep pattern
> 
> I second this.  It will be a huge win over the "find . -exec grep" syntax in
> that it will spawn a vastly smaller number grep processes over the duration
> of the run.
> - -- 
> Kirk Strauser
> The Strauser Group
> Open. Solutions. Simple.
> http://www.strausergroup.com/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> 
> iD8DBQE/hKQo5sRg+Y0CpvERAurgAJ0XB8pDWsTT6Etuwfy9lyhRDAHkTwCfRLI4
> spgHGqo4FzL+7uRGeWML+nk=
> =qPBI
> -----END PGP SIGNATURE-----


I like the xargs solution, but why do you have to get in our faces with the
PGP crap?

Do you have any idea how FEW people use it, and how FEW people give a
tinker's damn whether you are posting a message with a key registered to
the name Kirk Strauser?

You real name could be Gertrude Hoskenblatt, so what the hell is the point?

If you were communicating with your bank on a sensitive matter involving
patents and copyrights, I could see using PGP.

But HERE, we only care about the quality of our posts, and part of that
quality involves whether you clutter them with useless garbage or not.

It's nothing but a big, pretentious ego-trip.

(if it wasn't, you would put the info in your headers and refer to it in
a short line in your sig, like people with manners do)

Guess what? It is no harder to install PGP than it is to install a frigging
text editor, so I cannot imagine who the hell you think you are impressing.

You have a BIZARRE idea of what constitutes "Solutions" that are "Simple".

If I see the stupid PGP sig again, you are killfiled for 30 days.

(Or are you going to tell me that I have to install a different newsreader
that hides PGP sigs so that you can get some kind of neurotic satisfaction
from chronically advertising the fact that you use a program that most
people don't?)


-- 
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
0
zzzzzz (1966)
10/9/2003 12:59:19 AM
On Wed, 08 Oct 2003 18:25:33 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:
> 
> 
> On Wed, 08 Oct 2003 22:59:18 +0000, Alan Connor wrote:
> 
>> On Wed, 08 Oct 2003 17:33:56 -0500, Dave Uhring <daveuhring@yahoo.com> wrote:
> 
>>> It came from Solaris.  I posted the wrong command ;-)
>>> 
>> 
>> <chuckle>
>> 
>> Thanks.
> 
> Solaris find(1):
> 
>      -exec command
>            True if the executed command returns a zero  value  as
>            exit  status. The end of command must be punctuated by
>            an escaped semicolon (;). A  command  argument  {}  is
>            replaced  by  the current path name. If the last argu-
>            ment to -exec is {} and you specify + rather than  the
>            semicolon  (;),  the  command  will  be  invoked fewer
>            times, with {} replaced by groups of pathnames.
> 
> Makes the search run quicker.
> 

Ahh.

-- 
Later, Alan C
You can find my email address at the website: contact.html
take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
0
zzzzzz (1966)
10/9/2003 12:59:20 AM
On Wed, 08 Oct 2003 21:59:12 GMT, Alan Connor <zzzzzz@xxx.yyy> wrote:
> On Wed, 08 Oct 2003 21:25:48 GMT, Mairhtin O'Feannag <irishboyca@rocketmail.com> wrote:
>> 
>> 
>> I want to search all the files on my computer for the occurance of a 
>> particular string.  Before you blast me, I know, this seems silly.  But I 
>> have a reason.
>> 
>> I can use find ./ -name * to list all files, but how do I send them through 
>> a "grep" to find any occurance of, say, "poohead" within the files ????
>> 
>> 
>> Mairhtin O'Feannag
>> 
> 
> If you have GNU grep, you can do:
> 
> grep -rs  'poolhead'  /   # the r means recursive and the s silences error
>                           # messages 
> 
> If not, then try something like this:
> 
> find /  -type f  -exec  grep 'poolhead' {} \;
> 
> The {} refers to whatever file find is currently focussing on.
> 
> 

I usually do it like this

find / -type f -exec grep 'poolhead' /dev/null \{\} \;

having two files in the arguments for grep will make grep print
out the file name it finds the string in.  Of course it'll never
find it in /dev/null  :)


0
creideiki (13)
10/9/2003 1:59:22 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alan Connor wrote:
> I like the xargs solution, but why do you have to get in our faces with the
> PGP crap?
> 
> Do you have any idea how FEW people use it, and how FEW people give a
> tinker's damn whether you are posting a message with a key registered to
> the name Kirk Strauser?
> 
> You real name could be Gertrude Hoskenblatt, so what the hell is the point?
> 
> If you were communicating with your bank on a sensitive matter involving
> patents and copyrights, I could see using PGP.
> 
> But HERE, we only care about the quality of our posts, and part of that
> quality involves whether you clutter them with useless garbage or not.
> 
> It's nothing but a big, pretentious ego-trip.
> 
> (if it wasn't, you would put the info in your headers and refer to it in
> a short line in your sig, like people with manners do)
> 
> Guess what? It is no harder to install PGP than it is to install a frigging
> text editor, so I cannot imagine who the hell you think you are impressing.
> 
> You have a BIZARRE idea of what constitutes "Solutions" that are "Simple".
> 
> If I see the stupid PGP sig again, you are killfiled for 30 days.
> 
> (Or are you going to tell me that I have to install a different newsreader
> that hides PGP sigs so that you can get some kind of neurotic satisfaction
> from chronically advertising the fact that you use a program that most
> people don't?)

Nope, but do find a newsreader with decent filtering capabilities, and have it chuck out any message 
that begins with "BEGIN PGP SIGNED MESSAGE" in the first couple of lines.

I think that will make everyone happier :)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/hNMHeS99pGMif6wRAixfAJwJOmmP3qPmbfo5Bbp00g2yAniG+gCg1sxD
kSIFM+qiKQqgjHx6wzBmCHM=
=Rv4v
-----END PGP SIGNATURE-----

0
spam405 (14)
10/9/2003 3:16:17 AM
On Thu, 09 Oct 2003 00:59:19 +0000, Alan Connor wrote:

> (Or are you going to tell me that I have to install a different newsreader
> that hides PGP sigs so that you can get some kind of neurotic satisfaction
> from chronically advertising the fact that you use a program that most
> people don't?)

Like you do with elrav1.  But you've killfiled me forever (didn't you once
claim that you never do that?); I'm writing this solely for the benefit of
the others reading the thread.

0
emurphy42 (1226)
10/9/2003 4:58:01 AM
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2003-10-09T01:59:22Z, Creideiki <creideiki@cfl.rr.com> writes:

> I usually do it like this
>
> find / -type f -exec grep 'poolhead' /dev/null \{\} \;
>
> having two files in the arguments for grep will make grep print out the
> file name it finds the string in.  Of course it'll never find it in
> /dev/null :)

So will the '-l' option to grep:

    $ grep -l foo test.mail
    test.mail

And in any case you really want to use xargs instead of -exec .
=2D --=20
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/hUp95sRg+Y0CpvERAo7WAJwPfGEk2rPQSq7NqtGE/ZFSF/x8aACePF3q
4nCxH0nDdyfvGmyXETMpUEA=3D
=3DWqZe
=2D----END PGP SIGNATURE-----
0
kirk (233)
10/9/2003 11:50:06 AM
[This followup was posted to comp.os.linux.misc]

In article <Xns940E92E72FD06mairhtinofeannag@64.164.98.49>, 
irishboyca@rocketmail.com says...
> I want to search all the files on my computer for the occurance of a 
> particular string.  Before you blast me, I know, this seems silly.  But I 
> have a reason.
> 
> I can use find ./ -name * to list all files, but how do I send them through 
> a "grep" to find any occurance of, say, "poohead" within the files ????
> 
> 
> Mairhtin O'Feannag

find ./ -name '*' -exec fgrep poolhead /dev/null '{}' \;
0
raisin3 (35)
10/9/2003 1:18:41 PM
That would be "poohead", not "poolhead".   Giggle

It's interesting to me STILL that flame wars can occur in such a 
simple/direct thread.  :)

I used the xargs solution.  Seems to work.  I've come across it before, 
and had simply forgotten it.  Have to write these things down, now that 
I'm old and feeble (NOT!).  

Thanks for all the prompt and helpful responses folks!!!!

M


Barry Kimelman <raisin@delete-this-trash.mts.net> wrote in
news:MPG.19ef1c266d8eeca898969b@news.mts.net: 

> [This followup was posted to comp.os.linux.misc]
> 
> In article <Xns940E92E72FD06mairhtinofeannag@64.164.98.49>, 
> irishboyca@rocketmail.com says...
>> I want to search all the files on my computer for the occurance of a 
>> particular string.  Before you blast me, I know, this seems silly. 
>> But I have a reason.
>> 
>> I can use find ./ -name * to list all files, but how do I send them
>> through a "grep" to find any occurance of, say, "poohead" within the
>> files ???? 
>> 
>> 
>> Mairhtin O'Feannag
> 
> find ./ -name '*' -exec fgrep poolhead /dev/null '{}' \;
> 

0
irishboyca (42)
10/9/2003 4:57:00 PM
On Wed, 08 Oct 2003 21:25:48 +0000, Mairhtin O'Feannag wrote:

> I want to search all the files on my computer for the occurance of a
> particular string.  Before you blast me, I know, this seems silly.  But I
> have a reason.
> 
> I can use find ./ -name * to list all files, but how do I send them
> through a "grep" to find any occurance of, say, "poohead" within the files
> ????
> 
> 
> Mairhtin O'Feannag
grep -R poohead ./*
0
10/9/2003 7:12:45 PM
On Thu, 09 Oct 2003 11:50:06 GMT, Kirk Strauser <kirk@strauser.com> wrote:
> At 2003-10-09T01:59:22Z, Creideiki <creideiki@cfl.rr.com> writes:
> 
>> I usually do it like this
>>
>> find / -type f -exec grep 'poolhead' /dev/null \{\} \;
>>
>> having two files in the arguments for grep will make grep print out the
>> file name it finds the string in.  Of course it'll never find it in
>> /dev/null :)
> 
> So will the '-l' option to grep:
> 
>     $ grep -l foo test.mail
>     test.mail
> 
> And in any case you really want to use xargs instead of -exec .

Yeah, I hadn't known of xargs before now.

But what I was doing with the double file name was make the
find -exec grep act like grep with globbing, where it prints
the name of the file it finds the regular expression *and* prints
the line that matched it.  -l only prints the name.


     $ grep  foo /dev/null test.mail
     test.mail:someline with the string 'foo' in it


0
creideiki (13)
10/9/2003 7:45:18 PM
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 2003-10-09T19:45:18Z, Creideiki <creideiki@cfl.rr.com> writes:

> But what I was doing with the double file name was make the find -exec
> grep act like grep with globbing, where it prints the name of the file it
> finds the regular expression *and* prints the line that matched it.  -l
> only prints the name.

Oh!  Like the "-H" flag to GNU grep:

    $ grep -H tells wi.4
    wi.4:This tells the pccard system to use PCI interrupts for this odd be=
ast.

=2D --=20
Kirk Strauser
The Strauser Group
Open. Solutions. Simple.
http://www.strausergroup.com/
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/hb2i5sRg+Y0CpvERAnvsAJ9QSJ2JB9BYCBPwjpwQzssZwHIB5ACgkdLk
H0kl6jpgFiSNNh8d64+UipQ=3D
=3D80E/
=2D----END PGP SIGNATURE-----
0
kirk (233)
10/9/2003 8:00:07 PM
> I want to search all the files on my computer for the occurance of a 
> particular string.  

The use of `exec` is one way to do this, but another is this:

find / -type f | xargs grep something

Xargs is one of the *very* cool commands that isn't used as much as it
should be (see lsof).  I am just learning it myself actually.  The
thing about xargs is that the command that comes after it is treated
as if it's being piped to.  So xargs builds a list of input from what
came before it, and then does the command that comes after it for each
item in that list.

You could, for example, find all files owned by a certain person, and
copy them to a directory, etc.

Enjoy.

-danielrm26
0
10/10/2003 1:22:32 AM
Reply:
Similar Artilces:

Compiling fortran lib with mex file
Hi, I am trying to compile a library written in fortran90 with mexfile. The library comes along with a short makefile which looks like as follow fortran=/usr/bin/gfortran-4.4 -fexceptions -fbackslash -I/matlab/extern/include -I/matlab/simulink/include gcc-4.4 -dynamiclib -o libie2mv2.dylib ie2mcom.o ie2mmex.o 2dmlbib.o -L/usr/lib/gcc/x86_64-linux-gnu/4.4/ -lgfortran -L/home/andrea/matlab/bin/glnxa64 -lmx -lmex -lmat ie2mcom.o : ie2mcom.f90 $(fortran) -c -fpic ie2mcom.f90 ie2mmex.o : ie2mcom.o ie2mmex.f90 $(fortran) -c -fpic ie2mmex.f90 2dmlbib.o : 2dmlbib.f90 ...

Find and Grep together
Hi All, I am sorry if this is not the right group for this question. I am using find and grep together to find a string in a file from the top level directories. find . -name "*.c" -exec grep "string" {} \; -print | more. | \/ top level directorie I am sure that the string I am searching is in the lower directories where I am searching but this command is unable to find the string which I am looking. Can anyone please help me. My version control tool is clear case and my config spec also supports all the files....

How to find out the current version of the MySQL installation ?
How to find out (from the command line under Linux) the current version of the MySQL installation ? Or is there a config file which contains the version number ? Werner Werner Sammer <wersam@yahoo.de> wrote: > How to find out (from the command line under Linux) > the current version of the MySQL installation ? > Or is there a config file which contains the version number ? > Werner Command line: mysql --version Regards, Johan -- _____________________________________ Ing. Johan van Oostrum chaos geordend - www.chaosgeordend.nl _____________________________________ >...

Mex/M file calling precedence
If I have two functions with the same name in the same directory, one of which is an M file and the other a Mex file, which is called by default from Matlab? For example, if I have "foo.m" and "foo.mexw64", which will be called by typing "foo();" on the command line? Is there some way to explicitly specify which one to call from within the M-code? Thanks, "Jeff Gullett" <Jeffrey.Gullett@ngc.com> wrote in message <ibv6d4$1d3$1@fred.mathworks.com>... > If I have two functions with the same name in the same directory, one of which is an...

FAQ 5.36 Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? #14
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.36: Why does Perl let me delete read-only files? Why does "-i" clobber protected files? Isn't this a bug in Perl? This is elaborately and painstakingly described in the file-dir-perms article in th...

PDF File -- Security lock
I was looking at a PDF file that was just a companies reproduction of a product label -- a herbcide, for what its worth. These labels are mostly long strings of boilerplate language with safety precautions for use, etc. that can go on for pages upon pages and are pretty much the same for each herbcide. There are usually then one or two pages that deal specifically with the herbicide itself. So, rather than print off all the pages, I went to copy and paste the relevant page and found that while I was allowed to print the relevant document, copy function was disabled. There was a little gold...

finding max
Hello all I have a matrix a = 1 2 3 4 5 6 7 8 9 10 11 12 now I call max(a) ans = 9 10 11 12 to find the max, I have to call max(max(a)) Is there any way I can get the max of a matrix in one command? Thanks sore wrote: > > Hello all > > I have a matrix > > a = > > 1 2 3 4 > 5 6 7 8 > 9 10 11 12 > > now I call > > max(a) > > ans = > > 9 10 11 12 > > to find the max, I have to call max(max(a)) > > Is there any way I can get the max of a matrix > in one command? >...

Re: Invisible retain statement when appending files with set stat ement?
z- I think this is what you want: data bothfiles; set onecol (in=in1) twocols (in=in2); if in1 then do; m = 9; col1=9; end; Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: z [mailto:gzuckier@YAHOO.COM] Sent: Wednesday, October 01, 2003 12:33 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Invisible retain statement when appending files with set statement? Can anyone explain the behavior of the following code? /*make a couple of datasets*/ /*first has one variable, 3 records*/ data onecol; m=0; output; output; output; /*second has two variables, 1 record*/...

XP iSeries NetServer IFS Problem with Copy Files
Hello, I am having here a strange problem. I have installed several PCs with Windows XP Professional. To connect the AS400 IFS (NetServer) I also installed the Windows Client. I can login to the iSeries IFS and browse the directories. I can also copy small Files (600 KB) into the IFS. When trying to copy larger Files ( > 1 MB) I got a message "Cannot copy File xyz: The request is not supproted" When doing the same thing on a Windows 2000 PC with the same user it works. I have searched the IBM Sites but found only a hint regarding a Win XP Session Timeout parameter, but it had ...

Narrowed down bottlneck to disk, how can I find out which FS is being hammered? 100% utilization
In my process of drilling down to get to the bottom of our performance issues, I am seeing huge I/O wait on a particular disk. What tools are available to dig deeper, find out which file system is hammering the disk and/or which processes are hogging the CPUS? We are talking 100% utilization here: mpstat output: CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl 0 199 0 259 12 2 176 9 22 30 0 1882 11 6 83 0 1 205 0 259 204 194 176 8 23 34 0 1801 11 5 84 0 2 203 0 289 34 23 176 7 23 31 ...

Find it all
Find it all http://asb-comm-logicx.net/ ...

std::string question #2
Hello, I would like to replace all the occurrence of "(" and ")" in C++ std::string to "\(" and "\)". For example: string s = "(abc)|(toto)|(lala)" will be become "\(abc\)|\(toto\)|\(lala\)" Question: Just wonder if there is a straight forward function to do so?? Currently I am using a while loop to read through the string, then basic_string::find and basic_string::replace the occurrence of "(" and ")". Any better solution? Thanks, Kian "Kian Goh" <kian@hotmail.com> wrote in message ...

SQL/table optimization for string search?
Hello group, I'm having a difficult time with an SQLRPGLE program. My problem is that I have a table with one field only, containing a large string of char data. I need to return rows which contain both of 2 host variables being searched for. I can't see any way to index this table that would help as I am using the LIKE predicate as follows: eval string1# = '%' + %trim(string1) + ' %'; eval string2# = '%' + %trim(string2) + ' %'; exec sql select field from table where field like :string1# and field like :string2# ; Similar to searching a table for...

Complicated Find Expression
Hi, I am having problems with my find expression. Basically I want to find to find all files that are _not_ in a test directory and then execute a grep statement on them. The result of that grep statement is further refined by another grep. Finally I would like to echo the result. My grep expression on works fine by itself. The problem is with the find integration. Here is my expression, followed by the output. Thanks for any suggestions/pointers, Mike find ./ -path '*test*' -prune -o -print -exec "grep -PRi 'out.print.*?[^/][^/].*?the' {} | grep -Pi 'out...

[ace-users] Can't find ACEd.dll
This is a multi-part message in MIME format. ------_=_NextPart_001_01C7A8F9.1452B078 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi=20 =20 ACE VERSION: 5.5.8 =20 HOST MACHINE and OPERATING SYSTEM: Win XP=20 If on Windows based OS's, which version of WINSOCK do you use?: don't know =20 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): =20 THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific f...

ow-find without sun 'find' key
I've just moved over to a windows platform from solaris and have installed the windows version of xemacs 21.4. I'm having severe withdrawal symptoms from the loss of the sun 'find' key. So to correct this I would like to bind the M-s key combo to the ow-find function and M-S-s to the ow-find-backward function. I have 2 problems trying to achieve this. 1. I have sucessfully bound the M-s keys to the 'ow-find function using the following code in the init.el file. (define-key global-map [(meta ?s)] 'ow-find) However when I execute the function it returns the follo...

Literal text in .bib files
Hi all, I an referencing a URL in one of my papers, so I have the following entry in my bibtex file @UNPUBLISHED(Watton:1997:CCF, author = "John D. Watton", title = "Comparing C, Fortran, LISP, Java, blah blah", note = "http://openmap.bbn.com/\~kanderso/in-poly.ps", month = "May", year = "1997" ) The problem that I run into is that the bibliography in the generated PDF file is missing the tilde (~) character in the noted URL. I get no errors or warnings from bibtex or pdflatex. Is there some other way to force a literal character for b...

string split
Hi, I am dealing with the http header. it is basically made up of pairs like teh following: key: value\n\r key: value\n\r key: value\n\r Now, I need to capture those values and push them into an associative array, so basically I am going to use std::string this way: #include <string> #include <map> using namespace std; map<string, string> header; Yet, since I am quite new to std::string I'd like to know how to split one line based on ": ", then I am goit to remove any extra whitespaces by using my own chomp() thanks On 18....

Find File Attributes
Hello, As a part of my application,I need to compare files generated everyday.I need not need to compare the file contents.I just need to compare the file size,the line count.The files are named in the format,Hyyyymmdd,H denoting History. At present,I use the Dir function to search for the physical existence of the file and I use the debug.print for functions such as filelen(path),GetAttr() etc. My question is how would I put this as a module so that I can use a date function to compare files generated today with that of yesterday (mondays files to be compared against fridays). Also is it pos...

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Hello all, I am using Intel Fortran Intel(R) 64 Compiler XE for applications running o= n Intel(R) 64, Version 13.1.0.146 Build 20130121 on Fedora 18. I have a for= tran program (*.f90) which is continuously giving the 'Segmentation fault e= rror' when I am executing my fortran program after compiling with ifort.=20 I execute as below: $ ifort -o myprogram myprogram.f90 # creates the object file $ ./myprogram # Segmentation fault error pops up on the screen First, I would like to know what are the various reasons for 'Segmentation = fault error'? Is it a bug wi...

I need to find the rows that exist in one table but not in the other with condition
I need to find the rows that exist in one table but not in the other with this condition: (prod_name exist in table1 and not in table2.prod_name ) AND (prod_name exist in table1 and not in table2.'S'+prod_name ) explanation: i want to know if the product not exit and if the combination of the charachter "S" with the product Name also not exist at the other table B.R yuvi SELECT prod_name FROM table1 as A WHERE NOT EXISTS (select * from table2 as B where A.prod_name = B.prod_name) AND NOT EXISTS (select * from table2 as C where A....

ZX80 files > WAV
Just a heads up. There are now two or more utilities for those who want to try converting .O (ZX80) files to WAV. Details here: http://www.rwapservices.co.uk/ZX80_ZX81/forums/viewtopic.php?f=6&t=425 ...

remote file transfer through http using exec
I have a script which allows a user to upload a file. The script does some filename editing, mimetype checking, etc., and it's then supposed to send the file to a remote server, without any username/password prompt ( I have root access to both servers ). I'm trying to run an exec/passthru command using scp or rsync, but there's one fundamental question that I can't answer. When exec is called from the command line, e.g. `php some_script.php`, the user executing the php script will be whatever user is currently logged into the shell. Which user executes php when it's cal...

find breakpoint programmatically
Hi All, &nbsp; I accidentally posted this question in the special interest forum by mistake so sorry for the duplicate post but i thought it might never get read over there. <a href="http://forums.ni.com/ni/board/message?board.id=BreakPoint&amp;message.id=4162" target="_blank">http://forums.ni.com/ni/board/message?board.id=BreakPoint&amp;message.id=4162</a> &nbsp; Hi all, &nbsp; I was wondering if there is a way to search the vi hierachy for breakpoints programmatically?&nbsp; Why you may ask? &nbsp; I have a piece of code that take...

converting int to string
Hi, I had a look in FAQ but couldn't find any (what seemed to be) similar questions to this. Doubtless there is one, but I can't see it. Anyway...... If I have an int, say 1234, and I need to conert it to an equivalent string "1234" , is there a standard function that does this? Thanks for your help Michael Michael wrote: > Hi, > > I had a look in FAQ but couldn't find any (what seemed to be) similar > questions to this. Doubtless there is one, but I can't see it. Anyway...... > > If I have an int, say 1234, and I need to conert it to an eq...