why this find does not printing into file ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers why this find does not printing into file ?
# 1  
Old 07-20-2006
why this find does not printing into file ?

Hello all
I have this simple find operation that doing find and then grep me some string from within the pages
but I like to print the result to text file without success, this is what I have :

find . -name "*.html" | xargs egrep -h "<#.*env.exec\(*" > myStr.txt
I see the results , there is results but
the myStr.txt remains empty
# 2  
Old 07-20-2006
Quote:
Originally Posted by umen
Hello all
I have this simple find operation that doing find and then grep me some string from within the pages
but I like to print the result to text file without success, this is what I have :

find . -name "*.html" | xargs egrep -h "<#.*env.exec\(*" > myStr.txt
I see the results , there is results but
the myStr.txt remains empty
Hmm.. Try this..

Code:
find . -name "*.html" -exec grep -h "<#.*env.exec\(*" {} \; >myStr.txt

# 3  
Old 07-20-2006
tnx for the fast reply but ... no still no lock
i changed your example from grep to egrep and when i remove the
>myStr , it working great but when i try to print to file i have no luck
using sunos
# 4  
Old 07-20-2006
In which directory are you running this? Do you have permissions to write to that directory?
# 5  
Old 07-20-2006
yeah sure i have ... i can create files and stuff in this dir , did test it first thing
# 6  
Old 07-20-2006
Quote:
Originally Posted by umen
tnx for the fast reply but ... no still no lock
i changed your example from grep to egrep and when i remove the
>myStr , it working great but when i try to print to file i have no luck
using sunos

Its working fine for me. Smilie
# 7  
Old 07-20-2006
Maybe there is others way to do the sane job , just to eliminate the possibility that something wrong on my side ?
by the way there is lots of output from that find maybe there is some limit ?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Printing more info than find command gives out

Hi, I am trying to find files that are more than a gig with this command find . -size +1073741823c and it just gives me the names of the files. How do i get it to give me the actual size of the files too? ---------- Post updated at 09:41 AM ---------- Previous update was at 09:37 AM... (2 Replies)
Discussion started by: LilyClaro
2 Replies

2. Shell Programming and Scripting

ksh script find command not printing any results

Hello, Hitting a wall on this one. When at the command prompt it works fine: # find /home/testuser -name 'PAINT*canvasON.txt' /home/testuser/PAINT_canvasON.txt # pwd /home/testuser # ls -l PAINT*canvasON.txt -rw-r--r-- 1 root user 23 Feb 07 02:58 PAINT_canvasON.txt... (2 Replies)
Discussion started by: seekryts15
2 Replies

3. UNIX for Dummies Questions & Answers

Using awk to find max and printing entire line

Hi folks, I am very new to awk. I have what is probably a very simple question. I'm trying to get the max value of column 1, but also print column 2. My data looks like this: 0.044|2000-02-03 14:00:00 5.23|2000-02-03 05:45:00 5.26|2000-02-03 11:15:00 0|2000-02-01 18:30:00 So in this case... (2 Replies)
Discussion started by: amandarobe
2 Replies

4. UNIX for Dummies Questions & Answers

Taking word count from file and printing in file

hi, i am having a file which contains the below content, i need to take the word count of if and print the file name also inputfile.txt file_name1.txt,type_name1.txt file_name2.txt,type_name2.txt i would need the word count of the files like this if file_name*.txt then wc -l... (10 Replies)
Discussion started by: rohit_shinez
10 Replies

5. UNIX for Dummies Questions & Answers

Locate the column names with their values in the file and the printing the same in the other file

I have text file in Linux with two rows : first row conmtain the column nam and the second row contain its value .I nned to fetch few columns first and then redirect the data of those colum in the another file. Any ideas?? (1 Reply)
Discussion started by: Anamica
1 Replies

6. Shell Programming and Scripting

Recursive file processing from a path and printing output in a file

Hi All, The script below read the path and searches for the directories/subdirectories and for the files. If files are found in the sub directories then read the content of the all files and put the content in csv(comma delimted) format and the call the write to xml function to write the std... (1 Reply)
Discussion started by: Optimus81
1 Replies

7. Shell Programming and Scripting

wanted to find both link file and ordinary file using single find command

find . -type fl o/p is only the ordinary file. where in it wont give the link files. (2 Replies)
Discussion started by: nikhil jain
2 Replies

8. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

9. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

10. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies
Login or Register to Ask a Question